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 LANGUAGESQL CommandsReferenceCREATE LANGUAGE Functions & Procedures 10 define a new procedural language CREATE [ OR REPLACE ] [ PROCEDURAL ] LANGUAGE name CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE name H…SQL Commands · Functions & Procedures CREATE MATERIALIZED VIEWSQL CommandsReferenceCREATE MATERIALIZED VIEW Tables & Views 10 define a new materialized view CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] table_name [ (column_name [, ...] ) ] [ WITH ( storage_parameter [= value…SQL Commands · Tables & Views CREATE OPERATORSQL CommandsReferenceCREATE OPERATOR Types & Operators 10 define a new operator CREATE OPERATOR name ( PROCEDURE = function_name [, LEFTARG = left_type ] [, RIGHTARG = right_type ] [, COMMUTATOR = com_op ] [, NE…SQL Commands · Types & Operators CREATE OPERATOR CLASSSQL CommandsReferenceCREATE OPERATOR CLASS Types & Operators 10 define a new operator class CREATE OPERATOR CLASS name [ DEFAULT ] FOR TYPE data_type USING index_method [ FAMILY family_name ] AS { OPERATOR strat…SQL Commands · Types & Operators CREATE OPERATOR FAMILYSQL CommandsReferenceCREATE OPERATOR FAMILY Types & Operators 10 define a new operator family CREATE OPERATOR FAMILY name USING index_method CREATE OPERATOR FAMILY creates a new operator family. An operator fami…SQL Commands · Types & Operators CREATE POLICYSQL CommandsReferenceCREATE POLICY Roles & Privileges 10 define a new row level security policy for a table CREATE POLICY name ON table_name [ AS { PERMISSIVE | RESTRICTIVE } ] [ FOR { ALL | SELECT | INSERT | UP…SQL Commands · Roles & Privileges CREATE PROCEDURESQL CommandsReferenceCREATE PROCEDURE Functions & Procedures 11 define a new procedure CREATE [ OR REPLACE ] PROCEDURE name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } default_expr ] [, ...] ] ) { LANG…SQL Commands · Functions & Procedures CREATE PROPERTY GRAPHSQL CommandsReferenceCREATE PROPERTY GRAPH Other Objects 19 define a new SQL-property graph CREATE [ TEMP | TEMPORARY ] PROPERTY GRAPH name [ {VERTEX|NODE} TABLES ( vertex_table_definition [, ...] ) ] [ {EDGE|RE…SQL Commands · Other Objects CREATE PUBLICATIONSQL CommandsReferenceCREATE PUBLICATION Logical Replication 10 define a new publication CREATE PUBLICATION name [ FOR TABLE [ ONLY ] table_name [ * ] [, ...] | FOR ALL TABLES ] [ WITH ( publication_parameter [= …SQL Commands · Logical Replication CREATE ROLESQL CommandsReferenceCREATE ROLE Roles & Privileges 10 define a new database role CREATE ROLE name [ [ WITH ] option [ ... ] ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE …SQL Commands · Roles & Privileges CREATE RULESQL CommandsReferenceCREATE RULE Triggers & Rules 10 define a new rewrite rule CREATE [ OR REPLACE ] RULE name AS ON event TO table_name [ WHERE condition ] DO [ ALSO | INSTEAD ] { NOTHING | command | ( command …SQL Commands · Triggers & Rules CREATE SCHEMASQL CommandsReferenceCREATE SCHEMA Databases & Schemas 10 define a new schema CREATE SCHEMA schema_name [ AUTHORIZATION role_specification ] [ schema_element [ ... ] ] CREATE SCHEMA AUTHORIZATION role_specificat…SQL Commands · Databases & Schemas CREATE SEQUENCESQL CommandsReferenceCREATE SEQUENCE Tables & Views 10 define a new sequence generator CREATE [ TEMPORARY | TEMP ] SEQUENCE [ IF NOT EXISTS ] name [ AS data_type ] [ INCREMENT [ BY ] increment ] [ MINVALUE minva…SQL Commands · Tables & Views CREATE SERVERSQL CommandsReferenceCREATE SERVER Foreign Data 10 define a new foreign server CREATE SERVER [IF NOT EXISTS] server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ] FOREIGN DATA WRAPPER fdw_name [ OPTION…SQL Commands · Foreign Data CREATE STATISTICSSQL CommandsReferenceCREATE STATISTICS Indexes & Statistics 10 define extended statistics CREATE STATISTICS [ IF NOT EXISTS ] statistics_name [ ( statistics_kind [, ... ] ) ] ON column_name, column_name [, ...] …SQL Commands · Indexes & Statistics CREATE SUBSCRIPTIONSQL CommandsReferenceCREATE SUBSCRIPTION Logical Replication 10 define a new subscription CREATE SUBSCRIPTION subscription_name CONNECTION 'conninfo' PUBLICATION publication_name [, ...] [ WITH ( subscription_pa…SQL Commands · Logical Replication CREATE TABLE ASSQL CommandsReferenceCREATE TABLE AS Tables & Views 10 define a new table from the results of a query CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name [ (column_na…SQL Commands · Tables & Views CREATE TABLESPACESQL CommandsReferenceCREATE TABLESPACE Databases & Schemas 10 define a new tablespace CREATE TABLESPACE tablespace_name [ OWNER { new_owner | CURRENT_USER | SESSION_USER } ] LOCATION 'directory' [ WITH ( tablesp…SQL Commands · Databases & Schemas CREATE TEXT SEARCH CONFIGURATIONSQL CommandsReferenceCREATE TEXT SEARCH CONFIGURATION Text Search 10 define a new text search configuration CREATE TEXT SEARCH CONFIGURATION name ( PARSER = parser_name | COPY = source_config ) CREATE TEXT SEARC…SQL Commands · Text Search CREATE TEXT SEARCH DICTIONARYSQL CommandsReferenceCREATE TEXT SEARCH DICTIONARY Text Search 10 define a new text search dictionary CREATE TEXT SEARCH DICTIONARY name ( TEMPLATE = template [, option = value [, ... ]] ) CREATE TEXT SEARCH DIC…SQL Commands · Text Search CREATE TEXT SEARCH PARSERSQL CommandsReferenceCREATE TEXT SEARCH PARSER Text Search 10 define a new text search parser CREATE TEXT SEARCH PARSER name ( START = start_function , GETTOKEN = gettoken_function , END = end_function , LEXTYPE…SQL Commands · Text Search CREATE TEXT SEARCH TEMPLATESQL CommandsReferenceCREATE TEXT SEARCH TEMPLATE Text Search 10 define a new text search template CREATE TEXT SEARCH TEMPLATE name ( [ INIT = init_function , ] LEXIZE = lexize_function ) CREATE TEXT SEARCH TEMPL…SQL Commands · Text Search CREATE TRANSFORMSQL CommandsReferenceCREATE TRANSFORM Functions & Procedures 10 define a new transform CREATE [ OR REPLACE ] TRANSFORM FOR type_name LANGUAGE lang_name ( FROM SQL WITH FUNCTION from_sql_function_name [ (argument…SQL Commands · Functions & Procedures CREATE TRIGGERSQL CommandsReferenceCREATE TRIGGER Triggers & Rules 10 define a new trigger CREATE [ CONSTRAINT ] TRIGGER name { BEFORE | AFTER | INSTEAD OF } { event [ OR ... ] } ON table_name [ FROM referenced_table_name ] […SQL Commands · Triggers & Rules CREATE TYPESQL CommandsReferenceCREATE TYPE Types & Operators 10 define a new data type CREATE TYPE name AS ( [ attribute_name data_type [ COLLATE collation ] [, ... ] ] ) CREATE TYPE name AS ENUM ( [ 'label' [, ... ] ] )…SQL Commands · Types & Operators CREATE USERSQL CommandsReferenceCREATE USER Roles & Privileges 10 define a new database role CREATE USER name [ [ WITH ] option [ ... ] ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE …SQL Commands · Roles & Privileges CREATE USER MAPPINGSQL CommandsReferenceCREATE USER MAPPING Foreign Data 10 define a new mapping of a user to a foreign server CREATE USER MAPPING [IF NOT EXISTS] FOR { user_name | USER | CURRENT_USER | PUBLIC } SERVER server_name…SQL Commands · Foreign Data CREATE VIEWSQL CommandsReferenceCREATE VIEW Tables & Views 10 define a new view CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] [ RECURSIVE ] VIEW name [ ( column_name [, ...] ) ] [ WITH ( view_option_name [= view_option_value]…SQL Commands · Tables & Views CUBESQL CommandsPG187.2.4. GROUPING SETS, CUBE, and ROLLUP # More complex grouping operations than those described above are possible using the concept of grouping sets. The data selected by the FROM and WHERE …Table Expressions › GROUPING SETS, CUBE, and ROLLUP current_dateSQL CommandsPG18current_date → date Current date; see Section 9.9.5 current_date → 2019-12-23Date/Time Functions and Operators current_roleSQL CommandsPG18current_role → name This is equivalent to current_user.System Information Functions and Operators › Session Information Functions current_timeSQL CommandsPG18current_time → time with time zone Current time of day; see Section 9.9.5 current_time → 14:39:53.662522-05Date/Time Functions and Operators current_timestampSQL CommandsPG18current_timestamp → timestamp with time zone Current date and time (start of current transaction); see Section 9.9.5 current_timestamp → 2019-12-23 14:39:53.662522-05Date/Time Functions and Operators current_userSQL CommandsPG18current_user → name Returns the user name of the current execution context.System Information Functions and Operators › Session Information Functions DEALLOCATESQL CommandsReferenceDEALLOCATE Cursors & Prepared Statements 10 deallocate a prepared statement DEALLOCATE [ PREPARE ] { name | ALL } DEALLOCATE is used to deallocate a previously prepared SQL statement. If you…SQL Commands · Cursors & Prepared Statements DECLARESQL CommandsReferenceDECLARE Cursors & Prepared Statements 10 define a cursor DECLARE name [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ] CURSOR [ { WITH | WITHOUT } HOLD ] FOR query DECLARE allows a user to creat…SQL Commands · Cursors & Prepared Statements DELETESQL CommandsReferenceDELETE Queries & Data 10 delete rows of a table [ WITH [ RECURSIVE ] with_query [, ...] ] DELETE FROM [ ONLY ] table_name [ * ] [ [ AS ] alias ] [ USING from_item [, ...] ] [ WHERE condition…SQL Commands · Queries & Data DISCARDSQL CommandsReferenceDISCARD Sessions & Settings 10 discard session state DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP } DISCARD releases internal resources associated with a database session. This comma…SQL Commands · Sessions & Settings DISTINCTSQL CommandsPG187.3.3. DISTINCT # After the select list has been processed, the result table can optionally be subject to the elimination of duplicate rows. The DISTINCT key word is written directly after S…Select Lists › DISTINCT DOSQL CommandsReferenceDO Functions & Procedures 10 execute an anonymous code block DO [ LANGUAGE lang_name ] code DO executes an anonymous code block, or in other words a transient anonymous function in a procedu…SQL Commands · Functions & Procedures
More results

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

pg17: choose a version ex: extensions only select open