# Part VI. Reference

The entries in this Reference are meant to provide in reasonable length an authoritative, complete, and formal summary about their respective subjects. More information about the use of PostgreSQL, in narrative, tutorial, or example form, can be found in other parts of this book. See the cross-references listed on each reference page.

The reference entries are also available as traditional “man” pages.

Table of Contents

I. SQL CommandsABORT — abort the current transactionALTER AGGREGATE — change the definition of an aggregate functionALTER COLLATION — change the definition of a collationALTER CONVERSION — change the definition of a conversionALTER DATABASE — change a databaseALTER DEFAULT PRIVILEGES — define default access privilegesALTER DOMAIN — change the definition of a domain ALTER EVENT TRIGGER — change the definition of an event triggerALTER EXTENSION — change the definition of an extension ALTER FOREIGN DATA WRAPPER — change the definition of a foreign-data wrapperALTER FOREIGN TABLE — change the definition of a foreign tableALTER FUNCTION — change the definition of a functionALTER GROUP — change role name or membershipALTER INDEX — change the definition of an indexALTER LANGUAGE — change the definition of a procedural languageALTER LARGE OBJECT — change the definition of a large objectALTER MATERIALIZED VIEW — change the definition of a materialized viewALTER OPERATOR — change the definition of an operatorALTER OPERATOR CLASS — change the definition of an operator classALTER OPERATOR FAMILY — change the definition of an operator familyALTER POLICY — change the definition of a row-level security policyALTER PROCEDURE — change the definition of a procedureALTER PUBLICATION — change the definition of a publicationALTER ROLE — change a database roleALTER ROUTINE — change the definition of a routineALTER RULE — change the definition of a ruleALTER SCHEMA — change the definition of a schemaALTER SEQUENCE — change the definition of a sequence generator ALTER SERVER — change the definition of a foreign serverALTER STATISTICS — change the definition of an extended statistics object ALTER SUBSCRIPTION — change the definition of a subscriptionALTER SYSTEM — change a server configuration parameterALTER TABLE — change the definition of a tableALTER TABLESPACE — change the definition of a tablespaceALTER TEXT SEARCH CONFIGURATION — change the definition of a text search configurationALTER TEXT SEARCH DICTIONARY — change the definition of a text search dictionaryALTER TEXT SEARCH PARSER — change the definition of a text search parserALTER TEXT SEARCH TEMPLATE — change the definition of a text search templateALTER TRIGGER — change the definition of a triggerALTER TYPE — change the definition of a type ALTER USER — change a database roleALTER USER MAPPING — change the definition of a user mappingALTER VIEW — change the definition of a viewANALYZE — collect statistics about a databaseBEGIN — start a transaction blockCALL — invoke a procedureCHECKPOINT — force a write-ahead log checkpointCLOSE — close a cursorCLUSTER — cluster a table according to an indexCOMMENT — define or change the comment of an objectCOMMIT — commit the current transactionCOMMIT PREPARED — commit a transaction that was earlier prepared for two-phase commitCOPY — copy data between a file and a tableCREATE ACCESS METHOD — define a new access methodCREATE AGGREGATE — define a new aggregate functionCREATE CAST — define a new castCREATE COLLATION — define a new collationCREATE CONVERSION — define a new encoding conversionCREATE DATABASE — create a new databaseCREATE DOMAIN — define a new domainCREATE EVENT TRIGGER — define a new event triggerCREATE EXTENSION — install an extensionCREATE FOREIGN DATA WRAPPER — define a new foreign-data wrapperCREATE FOREIGN TABLE — define a new foreign tableCREATE FUNCTION — define a new functionCREATE GROUP — define a new database roleCREATE INDEX — define a new indexCREATE LANGUAGE — define a new procedural languageCREATE MATERIALIZED VIEW — define a new materialized viewCREATE OPERATOR — define a new operatorCREATE OPERATOR CLASS — define a new operator classCREATE OPERATOR FAMILY — define a new operator familyCREATE POLICY — define a new row-level security policy for a tableCREATE PROCEDURE — define a new procedureCREATE PUBLICATION — define a new publicationCREATE ROLE — define a new database roleCREATE RULE — define a new rewrite ruleCREATE SCHEMA — define a new schemaCREATE SEQUENCE — define a new sequence generatorCREATE SERVER — define a new foreign serverCREATE STATISTICS — define extended statisticsCREATE SUBSCRIPTION — define a new subscriptionCREATE TABLE — define a new tableCREATE TABLE AS — define a new table from the results of a queryCREATE TABLESPACE — define a new tablespaceCREATE TEXT SEARCH CONFIGURATION — define a new text search configurationCREATE TEXT SEARCH DICTIONARY — define a new text search dictionaryCREATE TEXT SEARCH PARSER — define a new text search parserCREATE TEXT SEARCH TEMPLATE — define a new text search templateCREATE TRANSFORM — define a new transformCREATE TRIGGER — define a new triggerCREATE TYPE — define a new data typeCREATE USER — define a new database roleCREATE USER MAPPING — define a new mapping of a user to a foreign serverCREATE VIEW — define a new viewDEALLOCATE — deallocate a prepared statementDECLARE — define a cursorDELETE — delete rows of a tableDISCARD — discard session stateDO — execute an anonymous code blockDROP ACCESS METHOD — remove an access methodDROP AGGREGATE — remove an aggregate functionDROP CAST — remove a castDROP COLLATION — remove a collationDROP CONVERSION — remove a conversionDROP DATABASE — remove a databaseDROP DOMAIN — remove a domainDROP EVENT TRIGGER — remove an event triggerDROP EXTENSION — remove an extensionDROP FOREIGN DATA WRAPPER — remove a foreign-data wrapperDROP FOREIGN TABLE — remove a foreign tableDROP FUNCTION — remove a functionDROP GROUP — remove a database roleDROP INDEX — remove an indexDROP LANGUAGE — remove a procedural languageDROP MATERIALIZED VIEW — remove a materialized viewDROP OPERATOR — remove an operatorDROP OPERATOR CLASS — remove an operator classDROP OPERATOR FAMILY — remove an operator familyDROP OWNED — remove database objects owned by a database roleDROP POLICY — remove a row-level security policy from a tableDROP PROCEDURE — remove a procedureDROP PUBLICATION — remove a publicationDROP ROLE — remove a database roleDROP ROUTINE — remove a routineDROP RULE — remove a rewrite ruleDROP SCHEMA — remove a schemaDROP SEQUENCE — remove a sequenceDROP SERVER — remove a foreign server descriptorDROP STATISTICS — remove extended statisticsDROP SUBSCRIPTION — remove a subscriptionDROP TABLE — remove a tableDROP TABLESPACE — remove a tablespaceDROP TEXT SEARCH CONFIGURATION — remove a text search configurationDROP TEXT SEARCH DICTIONARY — remove a text search dictionaryDROP TEXT SEARCH PARSER — remove a text search parserDROP TEXT SEARCH TEMPLATE — remove a text search templateDROP TRANSFORM — remove a transformDROP TRIGGER — remove a triggerDROP TYPE — remove a data typeDROP USER — remove a database roleDROP USER MAPPING — remove a user mapping for a foreign serverDROP VIEW — remove a viewEND — commit the current transactionEXECUTE — execute a prepared statementEXPLAIN — show the execution plan of a statementFETCH — retrieve rows from a query using a cursorGRANT — define access privilegesIMPORT FOREIGN SCHEMA — import table definitions from a foreign serverINSERT — create new rows in a tableLISTEN — listen for a notificationLOAD — load a shared library fileLOCK — lock a tableMOVE — position a cursorNOTIFY — generate a notificationPREPARE — prepare a statement for executionPREPARE TRANSACTION — prepare the current transaction for two-phase commitREASSIGN OWNED — change the ownership of database objects owned by a database roleREFRESH MATERIALIZED VIEW — replace the contents of a materialized viewREINDEX — rebuild indexesRELEASE SAVEPOINT — destroy a previously defined savepointRESET — restore the value of a run-time parameter to the default valueREVOKE — remove access privilegesROLLBACK — abort the current transactionROLLBACK PREPARED — cancel a transaction that was earlier prepared for two-phase commitROLLBACK TO SAVEPOINT — roll back to a savepointSAVEPOINT — define a new savepoint within the current transactionSECURITY LABEL — define or change a security label applied to an objectSELECT — retrieve rows from a table or viewSELECT INTO — define a new table from the results of a querySET — change a run-time parameterSET CONSTRAINTS — set constraint check timing for the current transactionSET ROLE — set the current user identifier of the current sessionSET SESSION AUTHORIZATION — set the session user identifier and the current user identifier of the current sessionSET TRANSACTION — set the characteristics of the current transactionSHOW — show the value of a run-time parameterSTART TRANSACTION — start a transaction blockTRUNCATE — empty a table or set of tablesUNLISTEN — stop listening for a notificationUPDATE — update rows of a tableVACUUM — garbage-collect and optionally analyze a databaseVALUES — compute a set of rowsII. PostgreSQL Client Applicationsclusterdb — cluster a PostgreSQL databasecreatedb — create a new PostgreSQL databasecreateuser — define a new PostgreSQL user accountdropdb — remove a PostgreSQL databasedropuser — remove a PostgreSQL user accountecpg — embedded SQL C preprocessorpg_amcheck — checks for corruption in one or more PostgreSQL databasespg_basebackup — take a base backup of a PostgreSQL clusterpgbench — run a benchmark test on PostgreSQLpg_config — retrieve information about the installed version of PostgreSQLpg_dump — extract a PostgreSQL database into a script file or other archive file pg_dumpall — extract a PostgreSQL database cluster into a script filepg_isready — check the connection status of a PostgreSQL serverpg_receivewal — stream write-ahead logs from a PostgreSQL serverpg_recvlogical — control PostgreSQL logical decoding streamspg_restore — restore a PostgreSQL database from an archive file created by pg_dump pg_verifybackup — verify the integrity of a base backup of a PostgreSQL clusterpsql — PostgreSQL interactive terminal reindexdb — reindex a PostgreSQL databasevacuumdb — garbage-collect and analyze a PostgreSQL databaseIII. PostgreSQL Server Applicationsinitdb — create a new PostgreSQL database clusterpg_archivecleanup — clean up PostgreSQL WAL archive filespg_checksums — enable, disable or check data checksums in a PostgreSQL database clusterpg_controldata — display control information of a PostgreSQL database clusterpg_ctl — initialize, start, stop, or control a PostgreSQL serverpg_resetwal — reset the write-ahead log and other control information of a PostgreSQL database clusterpg_rewind — synchronize a PostgreSQL data directory with another data directory that was forked from itpg_test_fsync — determine fastest wal_sync_method for PostgreSQLpg_test_timing — measure timing overheadpg_upgrade — upgrade a PostgreSQL server instancepg_waldump — display a human-readable rendering of the write-ahead log of a PostgreSQL database clusterpostgres — PostgreSQL database serverpostmaster — PostgreSQL database server