postgres-core-api-surface
Installation
SKILL.md
postgres-core-api-surface
Quick Reference :
PostgreSQL's command surface splits into four orthogonal layers and one out-of-band tool channel :
- DDL :
CREATE/ALTER/DROP/TRUNCATEfor schema objects (tables, indexes, views, roles, types, functions, policies, publications, subscriptions). - DML :
SELECT/INSERT/UPDATE/DELETE/MERGE(v15+) /COPYfor data. - DCL :
GRANT/REVOKE/ALTER DEFAULT PRIVILEGESfor access control. - TCL :
BEGIN/COMMIT/ROLLBACK/SAVEPOINT/RELEASE/ROLLBACK TO/SET TRANSACTIONfor transaction boundaries. psqlmeta-commands : backslash commands (\d,\dt,\df,\du,\timing,\watch,\copy,\i,\e,\!) drive the database operationally.
When you need to introspect the live database, prefer pg_catalog over information_schema : pg_catalog is faster, version-stable for PostgreSQL features, and exposes PostgreSQL-specific columns (pg_class.reltuples, pg_attribute.attnotnull). Use information_schema only when portability across SQL engines is a hard requirement.