select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Search PostgreSQL documentation

PG 18 · Browse by category, or enter a name or keyword

Category index248
CREATE TABLESQL CommandsReferenceCREATE TABLE Tables & Views 10 define a new table CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name ( [ { column_name data_type [ COLLATE colla…SQL Commands · Tables & Views EXPLAINSQL CommandsReferenceEXPLAIN Queries & Data 10 show the execution plan of a statement EXPLAIN [ ( option [, ...] ) ] statement EXPLAIN [ ANALYZE ] [ VERBOSE ] statement where option can be one of: ANALYZE [ boo…SQL Commands · Queries & Data SELECTSQL CommandsPG18Empty SELECT Lists The list of output expressions after SELECT can be empty, producing a zero-column result table. This is not valid syntax according to the SQL standard. PostgreSQL allows i…SELECT › Compatibility › Empty SELECT Lists SELECTSQL CommandsReferenceSELECT Queries & Data 10 retrieve rows from a table or view [ WITH [ RECURSIVE ] with_query [, ...] ] SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] [ * | expression [ [ AS ] output…SQL Commands · Queries & Data ABORTSQL CommandsReferenceABORT Transactions 10 abort the current transaction ABORT [ WORK | TRANSACTION ] ABORT rolls back the current transaction and causes all the updates made by the transaction to be discarded. …SQL Commands · Transactions ALLSQL CommandsPG189.25.4. ALL (array) # expression operator ALL (array expression) The right-hand side is a parenthesized expression, which must yield an array value. The left-hand expression is evaluated and…Row and Array Comparisons › ALL (array) ALTER AGGREGATESQL CommandsReferenceALTER AGGREGATE Functions & Procedures 10 change the definition of an aggregate function ALTER AGGREGATE name ( aggregate_signature ) RENAME TO new_name ALTER AGGREGATE name ( aggregate_sign…SQL Commands · Functions & Procedures ALTER COLLATIONSQL CommandsReferenceALTER COLLATION Types & Operators 10 change the definition of a collation ALTER COLLATION name REFRESH VERSION ALTER COLLATION name RENAME TO new_name ALTER COLLATION name OWNER TO { new_ow…SQL Commands · Types & Operators ALTER CONVERSIONSQL CommandsReferenceALTER CONVERSION Types & Operators 10 change the definition of a conversion ALTER CONVERSION name RENAME TO new_name ALTER CONVERSION name OWNER TO { new_owner | CURRENT_USER | SESSION_USER …SQL Commands · Types & Operators ALTER DATABASESQL CommandsReferenceALTER DATABASE Databases & Schemas 10 change a database ALTER DATABASE name [ [ WITH ] option [ ... ] ] where option can be: ALLOW_CONNECTIONS allowconn CONNECTION LIMIT connlimit IS_TEMPL…SQL Commands · Databases & Schemas ALTER DEFAULT PRIVILEGESSQL CommandsReferenceALTER DEFAULT PRIVILEGES Roles & Privileges 10 define default access privileges ALTER DEFAULT PRIVILEGES [ FOR { ROLE | USER } target_role [, ...] ] [ IN SCHEMA schema_name [, ...] ] abbrevi…SQL Commands · Roles & Privileges ALTER DOMAINSQL CommandsReferenceALTER DOMAIN Types & Operators 10 change the definition of a domain ALTER DOMAIN name { SET DEFAULT expression | DROP DEFAULT } ALTER DOMAIN name { SET | DROP } NOT NULL ALTER DOMAIN name AD…SQL Commands · Types & Operators ALTER EVENT TRIGGERSQL CommandsReferenceALTER EVENT TRIGGER Triggers & Rules 10 change the definition of an event trigger ALTER EVENT TRIGGER name DISABLE ALTER EVENT TRIGGER name ENABLE [ REPLICA | ALWAYS ] ALTER EVENT TRIGGER na…SQL Commands · Triggers & Rules ALTER EXTENSIONSQL CommandsReferenceALTER EXTENSION Extensions & Access Methods 10 change the definition of an extension ALTER EXTENSION name UPDATE [ TO new_version ] ALTER EXTENSION name SET SCHEMA new_schema ALTER EXTENSION…SQL Commands · Extensions & Access Methods ALTER FOREIGN DATA WRAPPERSQL CommandsReferenceALTER FOREIGN DATA WRAPPER Foreign Data 10 change the definition of a foreign-data wrapper ALTER FOREIGN DATA WRAPPER name [ HANDLER handler_function | NO HANDLER ] [ VALIDATOR validator_fun…SQL Commands · Foreign Data ALTER FOREIGN TABLESQL CommandsReferenceALTER FOREIGN TABLE Foreign Data 10 change the definition of a foreign table ALTER FOREIGN TABLE [ IF EXISTS ] [ ONLY ] name [ * ] action [, ... ] ALTER FOREIGN TABLE [ IF EXISTS ] [ ONLY ] …SQL Commands · Foreign Data ALTER FUNCTIONSQL CommandsReferenceALTER FUNCTION Functions & Procedures 10 change the definition of a function ALTER FUNCTION name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] action [ ... ] [ RESTRICT ] ALTER FUNCTIO…SQL Commands · Functions & Procedures ALTER GROUPSQL CommandsReferenceALTER GROUP Roles & Privileges 10 change role name or membership ALTER GROUP role_specification ADD USER user_name [, ... ] ALTER GROUP role_specification DROP USER user_name [, ... ] where…SQL Commands · Roles & Privileges ALTER INDEXSQL CommandsReferenceALTER INDEX Indexes & Statistics 10 change the definition of an index ALTER INDEX [ IF EXISTS ] name RENAME TO new_name ALTER INDEX [ IF EXISTS ] name SET TABLESPACE tablespace_name ALTER IN…SQL Commands · Indexes & Statistics ALTER LANGUAGESQL CommandsReferenceALTER LANGUAGE Functions & Procedures 10 change the definition of a procedural language ALTER [ PROCEDURAL ] LANGUAGE name RENAME TO new_name ALTER [ PROCEDURAL ] LANGUAGE name OWNER TO { ne…SQL Commands · Functions & Procedures ALTER LARGE OBJECTSQL CommandsReferenceALTER LARGE OBJECT Other Objects 10 change the definition of a large object ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_USER | SESSION_USER } ALTER LARGE OBJECT change…SQL Commands · Other Objects ALTER MATERIALIZED VIEWSQL CommandsReferenceALTER MATERIALIZED VIEW Tables & Views 10 change the definition of a materialized view ALTER MATERIALIZED VIEW [ IF EXISTS ] name action [, ... ] ALTER MATERIALIZED VIEW name DEPENDS ON EXTE…SQL Commands · Tables & Views ALTER OPERATORSQL CommandsReferenceALTER OPERATOR Types & Operators 10 change the definition of an operator ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } ) OWNER TO { new_owner | CURRENT_USER | SESSION_US…SQL Commands · Types & Operators ALTER OPERATOR CLASSSQL CommandsReferenceALTER OPERATOR CLASS Types & Operators 10 change the definition of an operator class ALTER OPERATOR CLASS name USING index_method RENAME TO new_name ALTER OPERATOR CLASS name USING index_me…SQL Commands · Types & Operators ALTER OPERATOR FAMILYSQL CommandsReferenceALTER OPERATOR FAMILY Types & Operators 10 change the definition of an operator family ALTER OPERATOR FAMILY name USING index_method ADD { OPERATOR strategy_number operator_name ( op_type, o…SQL Commands · Types & Operators ALTER POLICYSQL CommandsReferenceALTER POLICY Roles & Privileges 10 change the definition of a row level security policy ALTER POLICY name ON table_name RENAME TO new_name ALTER POLICY name ON table_name [ TO { role_name |…SQL Commands · Roles & Privileges ALTER PROCEDURESQL CommandsReferenceALTER PROCEDURE Functions & Procedures 11 change the definition of a procedure ALTER PROCEDURE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] action [ ... ] [ RESTRICT ] ALTER PROC…SQL Commands · Functions & Procedures ALTER PROPERTY GRAPHSQL CommandsReferenceALTER PROPERTY GRAPH Other Objects 19 change the definition of an SQL-property graph ALTER PROPERTY GRAPH name ADD [ {VERTEX|NODE} TABLES ( vertex_table_definition [, ...] ) ] [ {EDGE|RELATI…SQL Commands · Other Objects ALTER PUBLICATIONSQL CommandsReferenceALTER PUBLICATION Logical Replication 10 change the definition of a publication ALTER PUBLICATION name ADD TABLE [ ONLY ] table_name [ * ] [, ...] ALTER PUBLICATION name SET TABLE [ ONLY ] t…SQL Commands · Logical Replication ALTER ROLESQL CommandsReferenceALTER ROLE Roles & Privileges 10 change a database role ALTER ROLE role_specification [ WITH ] option [ ... ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATER…SQL Commands · Roles & Privileges ALTER ROUTINESQL CommandsReferenceALTER ROUTINE Functions & Procedures 11 change the definition of a routine ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] action [ ... ] [ RESTRICT ] ALTER ROUTINE na…SQL Commands · Functions & Procedures ALTER RULESQL CommandsReferenceALTER RULE Triggers & Rules 10 change the definition of a rule ALTER RULE name ON table_name RENAME TO new_name ALTER RULE changes properties of an existing rule. Currently, the only availab…SQL Commands · Triggers & Rules ALTER SCHEMASQL CommandsReferenceALTER SCHEMA Databases & Schemas 10 change the definition of a schema ALTER SCHEMA name RENAME TO new_name ALTER SCHEMA name OWNER TO { new_owner | CURRENT_USER | SESSION_USER } ALTER SCHEMA…SQL Commands · Databases & Schemas ALTER SEQUENCESQL CommandsReferenceALTER SEQUENCE Tables & Views 10 change the definition of a sequence generator ALTER SEQUENCE [ IF EXISTS ] name [ AS data_type ] [ INCREMENT [ BY ] increment ] [ MINVALUE minvalue | NO MINV…SQL Commands · Tables & Views ALTER SERVERSQL CommandsReferenceALTER SERVER Foreign Data 10 change the definition of a foreign server ALTER SERVER name [ VERSION 'new_version' ] [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) ] ALTER SERVER…SQL Commands · Foreign Data ALTER STATISTICSSQL CommandsReferenceALTER STATISTICS Indexes & Statistics 10 change the definition of an extended statistics object ALTER STATISTICS name OWNER TO { new_owner | CURRENT_USER | SESSION_USER } ALTER STATISTICS na…SQL Commands · Indexes & Statistics ALTER SUBSCRIPTIONSQL CommandsReferenceALTER SUBSCRIPTION Logical Replication 10 change the definition of a subscription ALTER SUBSCRIPTION name CONNECTION 'conninfo' ALTER SUBSCRIPTION name SET PUBLICATION publication_name [, ..…SQL Commands · Logical Replication ALTER SYSTEMSQL CommandsReferenceALTER SYSTEM Sessions & Settings 10 change a server configuration parameter ALTER SYSTEM SET configuration_parameter { TO | = } { value | 'value' | DEFAULT } ALTER SYSTEM RESET configuratio…SQL Commands · Sessions & Settings ALTER TABLESQL CommandsReferenceALTER TABLE Tables & Views 10 change the definition of a table ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ] action [, ... ] ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ] RENAME [ COLUMN ] c…SQL Commands · Tables & Views ALTER TABLESPACESQL CommandsReferenceALTER TABLESPACE Databases & Schemas 10 change the definition of a tablespace ALTER TABLESPACE name RENAME TO new_name ALTER TABLESPACE name OWNER TO { new_owner | CURRENT_USER | SESSION_USE…SQL Commands · Databases & Schemas
More results

Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.

pg17: choose a version ex: extensions only select open