Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Popular entries9761
ALTER RULEALTER 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 SCHEMAALTER SCHEMA ALTER SCHEMA — change the definition of a schema
Synopsis ALTER SCHEMA name RENAME TO new_name ALTER SCHEMA name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USE…ALTER SCHEMA
ALTER SCHEMAALTER 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 SEQUENCEALTER SEQUENCE ALTER SEQUENCE — change the definition of a sequence generator
Synopsis ALTER SEQUENCE [ IF EXISTS ] name [ AS data_type ] [ INCREMENT [ BY ] increment ] [ MINVALUE minvalue |…ALTER SEQUENCE
ALTER SEQUENCEALTER 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 SERVERALTER SERVER ALTER SERVER — change the definition of a foreign server
Synopsis ALTER SERVER name [ VERSION 'new_version' ] [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) ] ALTE…ALTER SERVER
ALTER SERVERALTER 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 STATISTICSALTER STATISTICS ALTER STATISTICS — change the definition of an extended statistics object
Synopsis ALTER STATISTICS name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER } …ALTER STATISTICS
ALTER STATISTICSALTER 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 SUBSCRIPTIONALTER SUBSCRIPTION ALTER SUBSCRIPTION — change the definition of a subscription
Synopsis ALTER SUBSCRIPTION name CONNECTION 'conninfo' ALTER SUBSCRIPTION name SET PUBLICATION publication_nam…ALTER SUBSCRIPTION
ALTER SUBSCRIPTIONALTER 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 SYSTEMALTER SYSTEM ALTER SYSTEM — change a server configuration parameter
Synopsis ALTER SYSTEM SET configuration_parameter { TO | = } { value [, ...] | DEFAULT } ALTER SYSTEM RESET configuration_…ALTER SYSTEM
ALTER SYSTEMALTER 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 TABLEALTER TABLE ALTER TABLE — change the definition of a table
SynopsisALTER TABLE
ALTER TABLEALTER 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 TABLESPACEALTER TABLESPACE ALTER TABLESPACE — change the definition of a tablespace
Synopsis ALTER TABLESPACE name RENAME TO new_name ALTER TABLESPACE name OWNER TO { new_owner | CURRENT_ROLE | CURREN…ALTER TABLESPACE
ALTER TABLESPACEALTER 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
ALTER TEXT SEARCH CONFIGURATIONALTER TEXT SEARCH CONFIGURATION ALTER TEXT SEARCH CONFIGURATION — change the definition of a text search configuration
Synopsis ALTER TEXT SEARCH CONFIGURATION name ADD MAPPING FOR token_typ…ALTER TEXT SEARCH CONFIGURATION
ALTER TEXT SEARCH CONFIGURATIONALTER TEXT SEARCH CONFIGURATION
Text Search
10
change the definition of a text search configuration
ALTER TEXT SEARCH CONFIGURATION name
ADD MAPPING FOR token_type [, ... ] WITH dictionary_n…SQL Commands · Text Search
ALTER TEXT SEARCH DICTIONARYALTER TEXT SEARCH DICTIONARY ALTER TEXT SEARCH DICTIONARY — change the definition of a text search dictionary
Synopsis ALTER TEXT SEARCH DICTIONARY name ( option [ = value ] [, ... ] ) ALTER…ALTER TEXT SEARCH DICTIONARY
ALTER TEXT SEARCH DICTIONARYALTER TEXT SEARCH DICTIONARY
Text Search
10
change the definition of a text search dictionary
ALTER TEXT SEARCH DICTIONARY name (
option [ = value ] [, ... ]
)
ALTER TEXT SEARCH DICTIONARY n…SQL Commands · Text Search
ALTER TEXT SEARCH PARSERALTER TEXT SEARCH PARSER ALTER TEXT SEARCH PARSER — change the definition of a text search parser
Synopsis ALTER TEXT SEARCH PARSER name RENAME TO new_name ALTER TEXT SEARCH PARSER name SET …ALTER TEXT SEARCH PARSER
ALTER TEXT SEARCH PARSERALTER TEXT SEARCH PARSER
Text Search
10
change the definition of a text search parser
ALTER TEXT SEARCH PARSER name RENAME TO new_name
ALTER TEXT SEARCH PARSER name SET SCHEMA new_schema
ALT…SQL Commands · Text Search
ALTER TEXT SEARCH TEMPLATEALTER TEXT SEARCH TEMPLATE ALTER TEXT SEARCH TEMPLATE — change the definition of a text search template
Synopsis ALTER TEXT SEARCH TEMPLATE name RENAME TO new_name ALTER TEXT SEARCH TEMPLATE…ALTER TEXT SEARCH TEMPLATE
ALTER TEXT SEARCH TEMPLATEALTER TEXT SEARCH TEMPLATE
Text Search
10
change the definition of a text search template
ALTER TEXT SEARCH TEMPLATE name RENAME TO new_name
ALTER TEXT SEARCH TEMPLATE name SET SCHEMA new_sc…SQL Commands · Text Search
ALTER TRIGGERALTER TRIGGER ALTER TRIGGER — change the definition of a trigger
Synopsis ALTER TRIGGER name ON table_name RENAME TO new_name ALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION ext…ALTER TRIGGER
ALTER TRIGGERALTER TRIGGER
Triggers & Rules
10
change the definition of a trigger
ALTER TRIGGER name ON table_name RENAME TO new_name
ALTER TRIGGER name ON table_name DEPENDS ON EXTENSION extension_name
…SQL Commands · Triggers & Rules
ALTER TYPEALTER TYPE ALTER TYPE — change the definition of a type
Synopsis ALTER TYPE name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER } ALTER TYPE name RENAME TO new_name ALTER …ALTER TYPE
ALTER TYPEALTER TYPE
Types & Operators
10
change the definition of a type
ALTER TYPE name action [, ... ]
ALTER TYPE name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
ALTER TYPE name RENAME AT…SQL Commands · Types & Operators
ALTER USERALTER USER ALTER USER — change a database role
Synopsis ALTER USER role_specification [ WITH ] option [ ... ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROL…ALTER USER
ALTER USERALTER USER
Roles & Privileges
10
change a database role
ALTER USER role_specification [ WITH ] option [ ... ]
where option can be:
SUPERUSER | NOSUPERUSER
| CREATEDB | NOCREATEDB
| CREATER…SQL Commands · Roles & Privileges
ALTER USER MAPPINGALTER USER MAPPING ALTER USER MAPPING — change the definition of a user mapping
Synopsis ALTER USER MAPPING FOR { user_name | USER | CURRENT_ROLE | CURRENT_USER | SESSION_USER | PUBLIC } SER…ALTER USER MAPPING
ALTER USER MAPPINGALTER USER MAPPING
Foreign Data
10
change the definition of a user mapping
ALTER USER MAPPING FOR { user_name | USER | CURRENT_USER | SESSION_USER | PUBLIC }
SERVER server_name
OPTIONS ( [ A…SQL Commands · Foreign Data
ALTER VIEWALTER VIEW ALTER VIEW — change the definition of a view
Synopsis ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] column_name SET DEFAULT expression ALTER VIEW [ IF EXISTS ] name ALTER [ COLUM…ALTER VIEW
ALTER VIEWALTER VIEW
Tables & Views
10
change the definition of a view
ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] column_name SET DEFAULT expression
ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] …SQL Commands · Tables & Views
amcheckF.1. amcheck — tools to verify table and index consistency
The amcheck module provides functions that allow you to verify the logical consistency of the structure of relations.
The B-Tree ch…amcheck — tools to verify table and index consistency
amcheck — tools to verify table and index consistencyF.1. amcheck — tools to verify table and index consistency
The amcheck module provides functions that allow you to verify the logical consistency of the structure of relations.
The B-Tree ch…amcheck — tools to verify table and index consistency
amqpPublish messages to AMQP brokers from PostgreSQL
amqp messaging rabbitmq
pg_amqp
Replication and streamsReplication and streams · Extensions
An Example36.16.4. An Example
Now that we have seen the ideas, here is the promised example of creating a new operator class. (You can find a working copy of this example in src/tutorial/complex.c and…An Example
ANALYZEANALYZE ANALYZE — collect statistics about a database
Synopsis ANALYZE [ ( option [, ...] ) ] [ table_and_columns [, ...] ] where option can be one of: VERBOSE [ boolean ] SKIP_LOCKED [ bool…ANALYZE
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open