Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index248
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
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
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
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
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
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
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
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
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
ANALYZEANALYZE
Maintenance
10
collect statistics about a database
ANALYZE [ VERBOSE ] [ table_name [ ( column_name [, ...] ) ] ]
ANALYZE collects statistics about the contents of tables in the data…SQL Commands · Maintenance
ANY9.25.3. ANY/SOME (array) # expression operator ANY (array expression) expression operator SOME (array expression) The right-hand side is a parenthesized expression, which must yield an array…Row and Array Comparisons › ANY/SOME (array)
ASOmitting the AS Key Word In the SQL standard, the optional key word AS can be omitted before an output column name whenever the new column name is a valid column name (that is, not the same …SELECT › Compatibility › Omitting the AS Key Word
AT LOCAL9.9.4. AT TIME ZONE and AT LOCAL # The AT TIME ZONE operator converts time stamp without time zone to/from time stamp with time zone, and time with time zone values to different time zones. …Date/Time Functions and Operators › AT TIME ZONE and AT LOCAL
AT TIME ZONE9.9.4. AT TIME ZONE and AT LOCAL # The AT TIME ZONE operator converts time stamp without time zone to/from time stamp with time zone, and time with time zone values to different time zones. …Date/Time Functions and Operators › AT TIME ZONE and AT LOCAL
BEGINBEGIN
Transactions
10
start a transaction block
BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ]
where transaction_mode is one of:
ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ…SQL Commands · Transactions
CALLCALL
Functions & Procedures
11
invoke a procedure
CALL name ( [ argument ] [, ...] )
CALL executes a procedure. If the procedure has any output parameters, then a result row will be returned…SQL Commands · Functions & Procedures
CASE9.18.1. CASE # The SQL CASE expression is a generic conditional expression, similar to if/else statements in other programming languages: CASE WHEN condition THEN result [WHEN ...] [ELSE res…Conditional Expressions › CASE
CHECKPOINTCHECKPOINT
Maintenance
10
force a write-ahead log checkpoint
A checkpoint is a point in the write-ahead log sequence at which all data files have been updated to reflect the information in t…SQL Commands · Maintenance
CLOSECLOSE
Cursors & Prepared Statements
10
close a cursor
CLOSE { name | ALL }
CLOSE frees the resources associated with an open cursor. After the cursor is closed, no subsequent operations are …SQL Commands · Cursors & Prepared Statements
CLUSTERCLUSTER
Maintenance
10
cluster a table according to an index
CLUSTER [VERBOSE] table_name [ USING index_name ]
CLUSTER [VERBOSE]
CLUSTER instructs PostgreSQL to cluster the table specified b…SQL Commands · Maintenance
COALESCE9.18.2. COALESCE # COALESCE(value [, ...]) The COALESCE function returns the first of its arguments that is not null. Null is returned only if all arguments are null. It is often used to sub…Conditional Expressions › COALESCE
COLLATION FORCOLLATION FOR ( "any" ) → text Returns the name of the collation of the value that is passed to it. The value is quoted and schema-qualified if necessary. If no collation was derived for the…System Information Functions and Operators › System Catalog Information Functions
COMMENTCOMMENT
Other Objects
10
define or change the comment of an object
COMMENT ON
{
ACCESS METHOD object_name |
AGGREGATE aggregate_name ( aggregate_signature ) |
CAST (source_type AS target_typ…SQL Commands · Other Objects
COMMITCOMMIT
Transactions
10
commit the current transaction
COMMIT [ WORK | TRANSACTION ]
COMMIT commits the current transaction. All changes made by the transaction become visible to others and a…SQL Commands · Transactions
COMMIT PREPAREDCOMMIT PREPARED
Transactions
10
commit a transaction that was earlier prepared for two-phase commit
COMMIT PREPARED transaction_id
COMMIT PREPARED commits a transaction that is in prepared s…SQL Commands · Transactions
COPYCOPY
Queries & Data
10
copy data between a file and a table
COPY table_name [ ( column_name [, ...] ) ]
FROM { 'filename' | PROGRAM 'command' | STDIN }
[ [ WITH ] ( option [, ...] ) ]
COPY …SQL Commands · Queries & Data
CREATE ACCESS METHODCREATE ACCESS METHOD
Extensions & Access Methods
10
define a new access method
CREATE ACCESS METHOD name
TYPE access_method_type
HANDLER handler_function
CREATE ACCESS METHOD creates a new a…SQL Commands · Extensions & Access Methods
CREATE AGGREGATECREATE AGGREGATE
Functions & Procedures
10
define a new aggregate function
CREATE AGGREGATE name ( [ argmode ] [ argname ] arg_data_type [ , ... ] ) (
SFUNC = sfunc,
STYPE = state_data_type
…SQL Commands · Functions & Procedures
CREATE CASTCREATE CAST
Types & Operators
10
define a new cast
CREATE CAST (source_type AS target_type)
WITH FUNCTION function_name [ (argument_type [, ...]) ]
[ AS ASSIGNMENT | AS IMPLICIT ]
CREATE CA…SQL Commands · Types & Operators
CREATE COLLATIONCREATE COLLATION
Types & Operators
10
define a new collation
CREATE COLLATION [ IF NOT EXISTS ] name (
[ LOCALE = locale, ]
[ LC_COLLATE = lc_collate, ]
[ LC_CTYPE = lc_ctype, ]
[ PROVIDER =…SQL Commands · Types & Operators
CREATE CONVERSIONCREATE CONVERSION
Types & Operators
10
define a new encoding conversion
CREATE [ DEFAULT ] CONVERSION name
FOR source_encoding TO dest_encoding FROM function_name
CREATE CONVERSION defines a…SQL Commands · Types & Operators
CREATE DATABASECREATE DATABASE
Databases & Schemas
10
create a new database
CREATE DATABASE name
[ WITH ] [ OWNER [=] user_name ]
[ TEMPLATE [=] template ]
[ ENCODING [=] encoding ]
[ LC_COLLATE [=] lc_col…SQL Commands · Databases & Schemas
CREATE DOMAINCREATE DOMAIN
Types & Operators
10
define a new domain
CREATE DOMAIN name [ AS ] data_type
[ COLLATE collation ]
[ DEFAULT expression ]
[ constraint [ ... ] ]
where constraint is:
[ CONSTR…SQL Commands · Types & Operators
CREATE EVENT TRIGGERCREATE EVENT TRIGGER
Triggers & Rules
10
define a new event trigger
CREATE EVENT TRIGGER name
ON event
[ WHEN filter_variable IN (filter_value [, ... ]) [ AND ... ] ]
EXECUTE PROCEDURE funct…SQL Commands · Triggers & Rules
CREATE EXTENSIONCREATE EXTENSION
Extensions & Access Methods
10
install an extension
CREATE EXTENSION [ IF NOT EXISTS ] extension_name
[ WITH ] [ SCHEMA schema_name ]
[ VERSION version ]
[ FROM old_version …SQL Commands · Extensions & Access Methods
CREATE FOREIGN DATA WRAPPERCREATE FOREIGN DATA WRAPPER
Foreign Data
10
define a new foreign-data wrapper
CREATE FOREIGN DATA WRAPPER name
[ HANDLER handler_function | NO HANDLER ]
[ VALIDATOR validator_function | NO V…SQL Commands · Foreign Data
CREATE FOREIGN TABLECREATE FOREIGN TABLE
Foreign Data
10
define a new foreign table
CREATE FOREIGN TABLE [ IF NOT EXISTS ] table_name ( [
{ column_name data_type [ OPTIONS ( option 'value' [, ... ] ) ] [ COLLAT…SQL Commands · Foreign Data
CREATE FUNCTIONCREATE FUNCTION
Functions & Procedures
10
define a new function
CREATE [ OR REPLACE ] FUNCTION
name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } default_expr ] [, ...] ] )
[ RETURNS…SQL Commands · Functions & Procedures
CREATE GROUPCREATE GROUP
Roles & Privileges
10
define a new database role
CREATE GROUP name [ [ WITH ] option [ ... ] ]
where option can be:
SUPERUSER | NOSUPERUSER
| CREATEDB | NOCREATEDB
| CREATEROL…SQL Commands · Roles & Privileges
CREATE INDEXCREATE INDEX
Indexes & Statistics
10
define a new index
CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] name ] ON table_name [ USING method ]
( { column_name | ( expression ) } …SQL Commands · Indexes & Statistics
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open