Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Popular entries9769
CREATE PROCEDURECREATE 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 GRAPHCREATE 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 PUBLICATIONCREATE PUBLICATION CREATE PUBLICATION — define a new publication
Synopsis CREATE PUBLICATION name [ FOR ALL TABLES | FOR publication_object [, ... ] ] [ WITH ( publication_parameter [= value…CREATE PUBLICATION
CREATE PUBLICATIONCREATE 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 ROLECREATE ROLE CREATE ROLE — define a new database role
Synopsis CREATE ROLE name [ [ WITH ] option [ ... ] ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE |…CREATE ROLE
CREATE ROLECREATE 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 RULECREATE RULE CREATE RULE — define a new rewrite rule
Synopsis CREATE [ OR REPLACE ] RULE name AS ON event TO table_name [ WHERE condition ] DO [ ALSO | INSTEAD ] { NOTHING | command | ( comma…CREATE RULE
CREATE RULECREATE 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 SCHEMACREATE SCHEMA CREATE SCHEMA — define a new schema
Synopsis CREATE SCHEMA schema_name [ AUTHORIZATION role_specification ] [ schema_element [ ... ] ] CREATE SCHEMA AUTHORIZATION role_specific…CREATE SCHEMA
CREATE SCHEMACREATE 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 SEQUENCECREATE SEQUENCE CREATE SEQUENCE — define a new sequence generator
Synopsis CREATE [ { TEMPORARY | TEMP } | UNLOGGED ] SEQUENCE [ IF NOT EXISTS ] name [ AS data_type ] [ INCREMENT [ BY ] incr…CREATE SEQUENCE
CREATE SEQUENCECREATE 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 SERVERCREATE SERVER CREATE SERVER — define a new foreign server
Synopsis CREATE SERVER [ IF NOT EXISTS ] server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ] FOREIGN DATA WRAPPER fdw_na…CREATE SERVER
CREATE SERVERCREATE 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 STATISTICSCREATE STATISTICS CREATE STATISTICS — define extended statistics
Synopsis CREATE STATISTICS [ [ IF NOT EXISTS ] statistics_name ] ON ( expression ) FROM table_name CREATE STATISTICS [ [ IF N…CREATE STATISTICS
CREATE STATISTICSCREATE 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 SUBSCRIPTIONCREATE SUBSCRIPTION CREATE SUBSCRIPTION — define a new subscription
Synopsis CREATE SUBSCRIPTION subscription_name CONNECTION 'conninfo' PUBLICATION publication_name [, ...] [ WITH ( subscri…CREATE SUBSCRIPTION
CREATE SUBSCRIPTIONCREATE 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 TABLECREATE TABLE CREATE TABLE — define a new table
Synopsis CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name ( [ { column_name data_type [ STORAGE…CREATE TABLE
CREATE TABLE ASCREATE TABLE AS CREATE TABLE AS — define a new table from the results of a query
Synopsis CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name [ (…CREATE TABLE AS
CREATE TABLE ASCREATE 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 TABLESPACECREATE TABLESPACE CREATE TABLESPACE — define a new tablespace
Synopsis CREATE TABLESPACE tablespace_name [ OWNER { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER } ] LOCATION 'direct…CREATE TABLESPACE
CREATE TABLESPACECREATE 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 CONFIGURATIONCREATE TEXT SEARCH CONFIGURATION CREATE TEXT SEARCH CONFIGURATION — define a new text search configuration
Synopsis CREATE TEXT SEARCH CONFIGURATION name ( PARSER = parser_name | COPY = sour…CREATE TEXT SEARCH CONFIGURATION
CREATE TEXT SEARCH CONFIGURATIONCREATE 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 DICTIONARYCREATE TEXT SEARCH DICTIONARY CREATE TEXT SEARCH DICTIONARY — define a new text search dictionary
Synopsis CREATE TEXT SEARCH DICTIONARY name ( TEMPLATE = template [, option = value [, ... ]…CREATE TEXT SEARCH DICTIONARY
CREATE TEXT SEARCH DICTIONARYCREATE 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 PARSERCREATE TEXT SEARCH PARSER CREATE TEXT SEARCH PARSER — define a new text search parser
Synopsis CREATE TEXT SEARCH PARSER name ( START = start_function , GETTOKEN = gettoken_function , END = …CREATE TEXT SEARCH PARSER
CREATE TEXT SEARCH PARSERCREATE 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 TEMPLATECREATE TEXT SEARCH TEMPLATE CREATE TEXT SEARCH TEMPLATE — define a new text search template
Synopsis CREATE TEXT SEARCH TEMPLATE name ( [ INIT = init_function , ] LEXIZE = lexize_function )CREATE TEXT SEARCH TEMPLATE
CREATE TEXT SEARCH TEMPLATECREATE 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 TRANSFORMCREATE TRANSFORM CREATE TRANSFORM — define a new transform
Synopsis CREATE [ OR REPLACE ] TRANSFORM FOR type_name LANGUAGE lang_name ( FROM SQL WITH FUNCTION from_sql_function_name [ (argume…CREATE TRANSFORM
CREATE TRANSFORMCREATE 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 TRIGGERCREATE TRIGGER CREATE TRIGGER — define a new trigger
Synopsis CREATE [ OR REPLACE ] [ CONSTRAINT ] TRIGGER name { BEFORE | AFTER | INSTEAD OF } { event [ OR ... ] } ON table_name [ FROM refe…CREATE TRIGGER
CREATE TRIGGERCREATE 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 TYPECREATE TYPE CREATE TYPE — define a new data type
Synopsis CREATE TYPE name AS ( [ attribute_name data_type [ COLLATE collation ] [, ... ] ] ) CREATE TYPE name AS ENUM ( [ 'label' [, ... ] ] …CREATE TYPE
CREATE TYPECREATE 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 USERCREATE USER CREATE USER — define a new database role
Synopsis CREATE USER name [ [ WITH ] option [ ... ] ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE |…CREATE USER
CREATE USERCREATE 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 MAPPINGCREATE USER MAPPING CREATE USER MAPPING — define a new mapping of a user to a foreign server
Synopsis CREATE USER MAPPING [ IF NOT EXISTS ] FOR { user_name | USER | CURRENT_ROLE | CURRENT_US…CREATE USER MAPPING
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open