Skip to main content

PostgreSQL 18 SQL Command Coverage Audit

Source authority: PostgreSQL 18 SQL Commands reference. The table maps every command family in the current reference to its handbook treatment. Core means taught with runnable syntax and production semantics; Reference means explained enough to recognize/use safely with the official command reference for exhaustive options; Advanced means specialized server-extension/admin functionality.

Legend: ✅ SQL/PG = SQL-standard concept implemented by PostgreSQL; 🐘 PG = PostgreSQL-specific command/administrative extension; ⚠️ compatibility alias = PostgreSQL alias retained for compatibility/convenience.

CommandPurposeHandbookDepthStandard / PG
ABORTAbort current transaction58–60Reference⚠️ alias for ROLLBACK
ALTER AGGREGATEChange aggregate definition/ownership28, 98–104Advanced🐘 PG
ALTER COLLATIONChange collation metadata11, 57Reference🐘 PG
ALTER CONVERSIONChange encoding conversion11, 98–104Reference🐘 PG
ALTER DATABASEChange database attributes/settings06, 111Core🐘 PG
ALTER DEFAULT PRIVILEGESSet privileges for future objects93Core🐘 PG
ALTER DOMAINChange domain type12Core✅ SQL/PG
ALTER EVENT TRIGGERChange event trigger102Reference🐘 PG
ALTER EXTENSIONUpdate/relocate extension104, 183Core🐘 PG
ALTER FOREIGN DATA WRAPPERChange FDW definition117Reference✅ SQL/MED + PG
ALTER FOREIGN TABLEChange foreign table117Reference✅ SQL/MED + PG
ALTER FUNCTIONChange function metadata98, 100Core✅ SQL/PG + extensions
ALTER GROUPChange role membership93Reference⚠️ role compatibility syntax
ALTER INDEXChange index attributes/name/tablespace50–57, 127Core🐘 PG
ALTER LANGUAGEChange procedural language98–100, 104Reference🐘 PG
ALTER LARGE OBJECTChange large-object ownership18, 106Reference🐘 PG
ALTER MATERIALIZED VIEWChange materialized view40Core🐘 PG
ALTER OPERATORChange operator definition metadata25, 57Advanced🐘 PG
ALTER OPERATOR CLASSChange operator class57Advanced🐘 PG
ALTER OPERATOR FAMILYChange operator family57Advanced🐘 PG
ALTER POLICYChange RLS policy96Core🐘 PG
ALTER PROCEDUREChange procedure metadata99Core✅ SQL/PG + extensions
ALTER PUBLICATIONChange logical publication89Core🐘 PG
ALTER ROLEChange role attributes/settings93–94, 111Core🐘 PG
ALTER ROUTINEChange function/procedure metadata generically98–99Reference✅ SQL/PG
ALTER RULEChange rewrite rule68, 98–102Reference🐘 PG
ALTER SCHEMAChange schema name/owner07Core✅ SQL/PG
ALTER SEQUENCEChange sequence41Core✅ SQL/PG
ALTER SERVERChange foreign server117Reference✅ SQL/MED + PG
ALTER STATISTICSChange extended-statistics target73Core🐘 PG
ALTER SUBSCRIPTIONChange logical subscription89Core🐘 PG
ALTER SYSTEMChange server configuration111Core🐘 PG
ALTER TABLEChange table/columns/constraints/partitioning08, 42, 115, 125–128Core✅ SQL/PG + extensions
ALTER TABLESPACEChange tablespace79, 111Reference🐘 PG
ALTER TEXT SEARCH CONFIGURATIONChange FTS configuration103Reference🐘 PG
ALTER TEXT SEARCH DICTIONARYChange FTS dictionary103Reference🐘 PG
ALTER TEXT SEARCH PARSERChange FTS parser103Advanced🐘 PG
ALTER TEXT SEARCH TEMPLATEChange FTS template103Advanced🐘 PG
ALTER TRIGGERRename/dependency metadata for trigger101Core✅ SQL/PG + extensions
ALTER TYPEChange enum/composite/type metadata12, 18Core✅ SQL/PG + extensions
ALTER USERChange login role93–94Reference⚠️ alias around ALTER ROLE
ALTER USER MAPPINGChange FDW user mapping117Reference✅ SQL/MED + PG
ALTER VIEWChange view attributes39Core✅ SQL/PG + extensions
ANALYZECollect planner statistics73, 75–76Core🐘 PG command
BEGINStart transaction block58Core✅ transaction concept
CALLInvoke procedure99Core✅ SQL/PG
CHECKPOINTForce checkpoint83Reference🐘 PG admin
CLOSEClose cursor38, 100Reference✅ SQL/PG
CLUSTERPhysically reorder table using index50, 79Reference🐘 PG
COMMENTAttach object comments05, 106Reference🐘 PG
COMMITCommit transaction58–59Core✅ SQL/PG
COMMIT PREPAREDCommit prepared two-phase transaction58, 141, 153Advanced🐘 PG / 2PC
COPYBulk import/export165–166Core🐘 PG command/protocol
CREATE ACCESS METHODDefine index/table access method50–57, 177, 183Advanced🐘 PG
CREATE AGGREGATEDefine aggregate28, 98Advanced🐘 PG
CREATE CASTDefine type conversion09–18, 98Advanced✅ SQL/PG + extensions
CREATE COLLATIONDefine collation11, 57Reference✅ SQL/PG
CREATE CONVERSIONDefine encoding conversion11Advanced🐘 PG
CREATE DATABASECreate database06Core🐘 implementation command
CREATE DOMAINDefine constrained domain type12Core✅ SQL/PG
CREATE EVENT TRIGGERDefine DDL event trigger102Core🐘 PG
CREATE EXTENSIONInstall extension104, 183Core🐘 PG
CREATE FOREIGN DATA WRAPPERDefine FDW117Reference✅ SQL/MED + PG
CREATE FOREIGN TABLEDefine foreign table117Core✅ SQL/MED + PG
CREATE FUNCTIONDefine function98, 100Core✅ SQL/PG + extensions
CREATE GROUPCreate role/group93Reference⚠️ alias around CREATE ROLE
CREATE INDEXCreate index50–57Core🐘 physical-design command
CREATE LANGUAGEInstall procedural language98–100, 104Reference🐘 PG
CREATE MATERIALIZED VIEWPersist query result40Core🐘 PG
CREATE OPERATORDefine operator25, 57Advanced🐘 PG
CREATE OPERATOR CLASSDefine index operator class57, 177Advanced🐘 PG
CREATE OPERATOR FAMILYDefine related operator classes57, 177Advanced🐘 PG
CREATE POLICYDefine RLS policy96Core🐘 PG
CREATE PROCEDUREDefine procedure99–100Core✅ SQL/PG + extensions
CREATE PUBLICATIONDefine logical publication89Core🐘 PG
CREATE ROLECreate role93Core🐘 PG
CREATE RULEDefine rewrite rule68, 98–102Advanced🐘 PG
CREATE SCHEMACreate schema namespace07Core✅ SQL/PG
CREATE SEQUENCECreate sequence41Core✅ SQL/PG
CREATE SERVERDefine foreign server117Core✅ SQL/MED + PG
CREATE STATISTICSCreate extended statistics73Core🐘 PG
CREATE SUBSCRIPTIONDefine logical subscription89Core🐘 PG
CREATE TABLECreate table and constraints08, 42–49Core✅ SQL/PG + extensions
CREATE TABLE ASMaterialize query into table08, 38, 46Core✅ SQL/PG
CREATE TABLESPACECreate storage tablespace79, 138Reference🐘 PG
CREATE TEXT SEARCH CONFIGURATIONCreate FTS configuration103Reference🐘 PG
CREATE TEXT SEARCH DICTIONARYCreate FTS dictionary103Reference🐘 PG
CREATE TEXT SEARCH PARSERCreate FTS parser103Advanced🐘 PG
CREATE TEXT SEARCH TEMPLATECreate FTS template103Advanced🐘 PG
CREATE TRANSFORMDefine language/type transform98–104Advanced🐘 PG
CREATE TRIGGERCreate DML trigger101Core✅ SQL/PG + extensions
CREATE TYPECreate enum/composite/base/range type12, 17–18Core✅ SQL/PG + extensions
CREATE USERCreate login role93–94Reference⚠️ alias around CREATE ROLE
CREATE USER MAPPINGMap local role to foreign server identity117Core✅ SQL/MED + PG
CREATE VIEWCreate view39Core✅ SQL/PG + extensions
DEALLOCATERemove prepared statement120Core✅ SQL concept + PG syntax
DECLAREDefine cursor38, 100Reference✅ SQL/PG
DELETEDelete rows22Core✅ SQL/PG + USING/RETURNING extensions
DISCARDReset session state/caches91, 111Reference🐘 PG
DOExecute anonymous procedural block100Core🐘 PG
DROP ACCESS METHODDrop access method50–57, 177Advanced🐘 PG
DROP AGGREGATEDrop aggregate28, 98Advanced🐘 PG
DROP CASTDrop cast09–18Reference✅ SQL/PG
DROP COLLATIONDrop collation11Reference✅ SQL/PG
DROP CONVERSIONDrop conversion11Advanced🐘 PG
DROP DATABASEDrop database06Core🐘 implementation command
DROP DOMAINDrop domain12Core✅ SQL/PG
DROP EVENT TRIGGERDrop event trigger102Reference🐘 PG
DROP EXTENSIONRemove extension and owned objects104, 183Core🐘 PG
DROP FOREIGN DATA WRAPPERDrop FDW117Reference✅ SQL/MED + PG
DROP FOREIGN TABLEDrop foreign table117Core✅ SQL/MED + PG
DROP FUNCTIONDrop function98Core✅ SQL/PG
DROP GROUPDrop group role93Reference⚠️ alias around DROP ROLE
DROP INDEXDrop index50–57, 127Core🐘 PG
DROP LANGUAGEDrop procedural language98–100Reference🐘 PG
DROP MATERIALIZED VIEWDrop materialized view40Core🐘 PG
DROP OPERATORDrop operator25Advanced🐘 PG
DROP OPERATOR CLASSDrop operator class57Advanced🐘 PG
DROP OPERATOR FAMILYDrop operator family57Advanced🐘 PG
DROP OWNEDDrop objects/privileges owned by roles93Reference🐘 PG
DROP POLICYDrop RLS policy96Core🐘 PG
DROP PROCEDUREDrop procedure99Core✅ SQL/PG
DROP PUBLICATIONDrop publication89Core🐘 PG
DROP ROLEDrop role93Core🐘 PG
DROP ROUTINEDrop routine generically98–99Reference✅ SQL/PG
DROP RULEDrop rewrite rule68Reference🐘 PG
DROP SCHEMADrop schema07Core✅ SQL/PG
DROP SEQUENCEDrop sequence41Core✅ SQL/PG
DROP SERVERDrop foreign server117Core✅ SQL/MED + PG
DROP STATISTICSDrop extended statistics73Core🐘 PG
DROP SUBSCRIPTIONDrop logical subscription89Core🐘 PG
DROP TABLEDrop table08Core✅ SQL/PG
DROP TABLESPACEDrop tablespace79, 138Reference🐘 PG
DROP TEXT SEARCH CONFIGURATIONDrop FTS configuration103Reference🐘 PG
DROP TEXT SEARCH DICTIONARYDrop FTS dictionary103Reference🐘 PG
DROP TEXT SEARCH PARSERDrop FTS parser103Advanced🐘 PG
DROP TEXT SEARCH TEMPLATEDrop FTS template103Advanced🐘 PG
DROP TRANSFORMDrop transform98–104Advanced🐘 PG
DROP TRIGGERDrop trigger101Core✅ SQL/PG
DROP TYPEDrop type12, 17–18Core✅ SQL/PG
DROP USERDrop login role93Reference⚠️ alias around DROP ROLE
DROP USER MAPPINGDrop foreign user mapping117Core✅ SQL/MED + PG
DROP VIEWDrop view39Core✅ SQL/PG
ENDCommit transaction58Reference⚠️ alias for COMMIT
EXECUTEExecute SQL prepared statement120Core✅ SQL concept + PG syntax
EXPLAINShow execution plan; ANALYZE can execute70–74Core🐘 PG
FETCHFetch cursor rows38, 100Reference✅ SQL/PG
GRANTGrant privileges or role membership93Core✅ SQL/PG + PG role form
IMPORT FOREIGN SCHEMAImport remote foreign tables117Core✅ SQL/MED + PG
INSERTInsert rows20, 23Core✅ SQL/PG + ON CONFLICT/RETURNING extensions
LISTENSubscribe session to notification channel121, 133Reference🐘 PG
LOADLoad shared library file104, 183Advanced🐘 PG
LOCKExplicit table lock64Core🐘 PG syntax
MERGEConditional source/target DML23Core✅ SQL/PG
MOVEPosition cursor38, 100Reference🐘 PG cursor command
NOTIFYSend asynchronous notification121, 133Reference🐘 PG
PREPARECreate prepared statement120Core✅ SQL concept + PG syntax
PREPARE TRANSACTIONPrepare two-phase transaction58, 141, 153Advanced🐘 PG / 2PC
REASSIGN OWNEDTransfer object ownership93Reference🐘 PG
REFRESH MATERIALIZED VIEWRecompute materialized view40Core🐘 PG
REINDEXRebuild index(es)78, 127Core🐘 PG
RELEASE SAVEPOINTDestroy savepoint without rollback60Core✅ SQL/PG
RESETRestore setting to default111Core🐘 PG session config
REVOKERemove privileges or role membership93Core✅ SQL/PG + PG role form
ROLLBACKAbort transaction58Core✅ SQL/PG
ROLLBACK PREPAREDAbort prepared two-phase transaction58, 141, 153Advanced🐘 PG / 2PC
ROLLBACK TO SAVEPOINTRoll back partial transaction work60Core✅ SQL/PG
SAVEPOINTCreate partial rollback point60Core✅ SQL/PG
SECURITY LABELApply security-provider label92–93, 187Advanced🐘 PG
SELECTQuery rows/expressions24–38Core✅ SQL/PG + extensions
SELECT INTOCreate table from query result08, 38Reference🐘 historical PG form; prefer CREATE TABLE AS
SETChange runtime parameter111Core✅ SQL/PG + PG settings
SET CONSTRAINTSSet deferred constraint checking42Core✅ SQL/PG
SET ROLEAssume role93Core✅ SQL/PG
SET SESSION AUTHORIZATIONChange session authorization identity93Reference✅ SQL/PG
SET TRANSACTIONSet transaction characteristics63Core✅ SQL/PG
SHOWDisplay runtime parameter111Core🐘 PG
START TRANSACTIONBegin transaction with characteristics58, 63Core✅ SQL/PG
TRUNCATERemove all rows with table-level semantics22Core✅ SQL/PG + extensions
UNLISTENStop notification subscription121, 133Reference🐘 PG
UPDATEUpdate rows21Core✅ SQL/PG + FROM/RETURNING extensions
VACUUMMVCC cleanup/freeze/analyze maintenance75–76Core🐘 PG
VALUESConstruct a row set38Core✅ SQL/PG

Audit conclusion​

All current PostgreSQL 18 command-reference entries are either taught directly at Core depth or mapped at Reference/Advanced depth to the chapter where an engineer learns when and why the command exists. Specialized object-definition commands (operator classes, text-search parser/templates, access methods, transforms) are intentionally Advanced because normal application developers consume these mechanisms through PostgreSQL core or extensions rather than authoring them routinely.

When exact syntax/options matter, the current PostgreSQL 18 command page remains the authority; this audit is a coverage map, not a replacement command reference.