]> begriffs open source - ai-pg/blob - full-docs/txt/sql-commands.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-commands.txt
1
2 SQL Commands
3
4    This part contains reference information for the SQL commands supported
5    by PostgreSQL. By “SQL” the language in general is meant; information
6    about the standards conformance and compatibility of each command can
7    be found on the respective reference page.
8
9    Table of Contents
10
11    ABORT — abort the current transaction
12    ALTER AGGREGATE — change the definition of an aggregate function
13    ALTER COLLATION — change the definition of a collation
14    ALTER CONVERSION — change the definition of a conversion
15    ALTER DATABASE — change a database
16    ALTER DEFAULT PRIVILEGES — define default access privileges
17    ALTER DOMAIN — change the definition of a domain
18    ALTER EVENT TRIGGER — change the definition of an event trigger
19    ALTER EXTENSION — change the definition of an extension
20    ALTER FOREIGN DATA WRAPPER — change the definition of a foreign-data
21           wrapper
22
23    ALTER FOREIGN TABLE — change the definition of a foreign table
24    ALTER FUNCTION — change the definition of a function
25    ALTER GROUP — change role name or membership
26    ALTER INDEX — change the definition of an index
27    ALTER LANGUAGE — change the definition of a procedural language
28    ALTER LARGE OBJECT — change the definition of a large object
29    ALTER MATERIALIZED VIEW — change the definition of a materialized view
30    ALTER OPERATOR — change the definition of an operator
31    ALTER OPERATOR CLASS — change the definition of an operator class
32    ALTER OPERATOR FAMILY — change the definition of an operator family
33    ALTER POLICY — change the definition of a row-level security policy
34    ALTER PROCEDURE — change the definition of a procedure
35    ALTER PUBLICATION — change the definition of a publication
36    ALTER ROLE — change a database role
37    ALTER ROUTINE — change the definition of a routine
38    ALTER RULE — change the definition of a rule
39    ALTER SCHEMA — change the definition of a schema
40    ALTER SEQUENCE — change the definition of a sequence generator
41    ALTER SERVER — change the definition of a foreign server
42    ALTER STATISTICS — change the definition of an extended statistics
43           object
44
45    ALTER SUBSCRIPTION — change the definition of a subscription
46    ALTER SYSTEM — change a server configuration parameter
47    ALTER TABLE — change the definition of a table
48    ALTER TABLESPACE — change the definition of a tablespace
49    ALTER TEXT SEARCH CONFIGURATION — change the definition of a text
50           search configuration
51
52    ALTER TEXT SEARCH DICTIONARY — change the definition of a text search
53           dictionary
54
55    ALTER TEXT SEARCH PARSER — change the definition of a text search
56           parser
57
58    ALTER TEXT SEARCH TEMPLATE — change the definition of a text search
59           template
60
61    ALTER TRIGGER — change the definition of a trigger
62    ALTER TYPE — change the definition of a type
63    ALTER USER — change a database role
64    ALTER USER MAPPING — change the definition of a user mapping
65    ALTER VIEW — change the definition of a view
66    ANALYZE — collect statistics about a database
67    BEGIN — start a transaction block
68    CALL — invoke a procedure
69    CHECKPOINT — force a write-ahead log checkpoint
70    CLOSE — close a cursor
71    CLUSTER — cluster a table according to an index
72    COMMENT — define or change the comment of an object
73    COMMIT — commit the current transaction
74    COMMIT PREPARED — commit a transaction that was earlier prepared for
75           two-phase commit
76
77    COPY — copy data between a file and a table
78    CREATE ACCESS METHOD — define a new access method
79    CREATE AGGREGATE — define a new aggregate function
80    CREATE CAST — define a new cast
81    CREATE COLLATION — define a new collation
82    CREATE CONVERSION — define a new encoding conversion
83    CREATE DATABASE — create a new database
84    CREATE DOMAIN — define a new domain
85    CREATE EVENT TRIGGER — define a new event trigger
86    CREATE EXTENSION — install an extension
87    CREATE FOREIGN DATA WRAPPER — define a new foreign-data wrapper
88    CREATE FOREIGN TABLE — define a new foreign table
89    CREATE FUNCTION — define a new function
90    CREATE GROUP — define a new database role
91    CREATE INDEX — define a new index
92    CREATE LANGUAGE — define a new procedural language
93    CREATE MATERIALIZED VIEW — define a new materialized view
94    CREATE OPERATOR — define a new operator
95    CREATE OPERATOR CLASS — define a new operator class
96    CREATE OPERATOR FAMILY — define a new operator family
97    CREATE POLICY — define a new row-level security policy for a table
98    CREATE PROCEDURE — define a new procedure
99    CREATE PUBLICATION — define a new publication
100    CREATE ROLE — define a new database role
101    CREATE RULE — define a new rewrite rule
102    CREATE SCHEMA — define a new schema
103    CREATE SEQUENCE — define a new sequence generator
104    CREATE SERVER — define a new foreign server
105    CREATE STATISTICS — define extended statistics
106    CREATE SUBSCRIPTION — define a new subscription
107    CREATE TABLE — define a new table
108    CREATE TABLE AS — define a new table from the results of a query
109    CREATE TABLESPACE — define a new tablespace
110    CREATE TEXT SEARCH CONFIGURATION — define a new text search
111           configuration
112
113    CREATE TEXT SEARCH DICTIONARY — define a new text search dictionary
114    CREATE TEXT SEARCH PARSER — define a new text search parser
115    CREATE TEXT SEARCH TEMPLATE — define a new text search template
116    CREATE TRANSFORM — define a new transform
117    CREATE TRIGGER — define a new trigger
118    CREATE TYPE — define a new data type
119    CREATE USER — define a new database role
120    CREATE USER MAPPING — define a new mapping of a user to a foreign
121           server
122
123    CREATE VIEW — define a new view
124    DEALLOCATE — deallocate a prepared statement
125    DECLARE — define a cursor
126    DELETE — delete rows of a table
127    DISCARD — discard session state
128    DO — execute an anonymous code block
129    DROP ACCESS METHOD — remove an access method
130    DROP AGGREGATE — remove an aggregate function
131    DROP CAST — remove a cast
132    DROP COLLATION — remove a collation
133    DROP CONVERSION — remove a conversion
134    DROP DATABASE — remove a database
135    DROP DOMAIN — remove a domain
136    DROP EVENT TRIGGER — remove an event trigger
137    DROP EXTENSION — remove an extension
138    DROP FOREIGN DATA WRAPPER — remove a foreign-data wrapper
139    DROP FOREIGN TABLE — remove a foreign table
140    DROP FUNCTION — remove a function
141    DROP GROUP — remove a database role
142    DROP INDEX — remove an index
143    DROP LANGUAGE — remove a procedural language
144    DROP MATERIALIZED VIEW — remove a materialized view
145    DROP OPERATOR — remove an operator
146    DROP OPERATOR CLASS — remove an operator class
147    DROP OPERATOR FAMILY — remove an operator family
148    DROP OWNED — remove database objects owned by a database role
149    DROP POLICY — remove a row-level security policy from a table
150    DROP PROCEDURE — remove a procedure
151    DROP PUBLICATION — remove a publication
152    DROP ROLE — remove a database role
153    DROP ROUTINE — remove a routine
154    DROP RULE — remove a rewrite rule
155    DROP SCHEMA — remove a schema
156    DROP SEQUENCE — remove a sequence
157    DROP SERVER — remove a foreign server descriptor
158    DROP STATISTICS — remove extended statistics
159    DROP SUBSCRIPTION — remove a subscription
160    DROP TABLE — remove a table
161    DROP TABLESPACE — remove a tablespace
162    DROP TEXT SEARCH CONFIGURATION — remove a text search configuration
163    DROP TEXT SEARCH DICTIONARY — remove a text search dictionary
164    DROP TEXT SEARCH PARSER — remove a text search parser
165    DROP TEXT SEARCH TEMPLATE — remove a text search template
166    DROP TRANSFORM — remove a transform
167    DROP TRIGGER — remove a trigger
168    DROP TYPE — remove a data type
169    DROP USER — remove a database role
170    DROP USER MAPPING — remove a user mapping for a foreign server
171    DROP VIEW — remove a view
172    END — commit the current transaction
173    EXECUTE — execute a prepared statement
174    EXPLAIN — show the execution plan of a statement
175    FETCH — retrieve rows from a query using a cursor
176    GRANT — define access privileges
177    IMPORT FOREIGN SCHEMA — import table definitions from a foreign server
178    INSERT — create new rows in a table
179    LISTEN — listen for a notification
180    LOAD — load a shared library file
181    LOCK — lock a table
182    MERGE — conditionally insert, update, or delete rows of a table
183    MOVE — position a cursor
184    NOTIFY — generate a notification
185    PREPARE — prepare a statement for execution
186    PREPARE TRANSACTION — prepare the current transaction for two-phase
187           commit
188
189    REASSIGN OWNED — change the ownership of database objects owned by a
190           database role
191
192    REFRESH MATERIALIZED VIEW — replace the contents of a materialized view
193    REINDEX — rebuild indexes
194    RELEASE SAVEPOINT — release a previously defined savepoint
195    RESET — restore the value of a run-time parameter to the default value
196    REVOKE — remove access privileges
197    ROLLBACK — abort the current transaction
198    ROLLBACK PREPARED — cancel a transaction that was earlier prepared for
199           two-phase commit
200
201    ROLLBACK TO SAVEPOINT — roll back to a savepoint
202    SAVEPOINT — define a new savepoint within the current transaction
203    SECURITY LABEL — define or change a security label applied to an object
204    SELECT — retrieve rows from a table or view
205    SELECT INTO — define a new table from the results of a query
206    SET — change a run-time parameter
207    SET CONSTRAINTS — set constraint check timing for the current
208           transaction
209
210    SET ROLE — set the current user identifier of the current session
211    SET SESSION AUTHORIZATION — set the session user identifier and the
212           current user identifier of the current session
213
214    SET TRANSACTION — set the characteristics of the current transaction
215    SHOW — show the value of a run-time parameter
216    START TRANSACTION — start a transaction block
217    TRUNCATE — empty a table or set of tables
218    UNLISTEN — stop listening for a notification
219    UPDATE — update rows of a table
220    VACUUM — garbage-collect and optionally analyze a database
221    VALUES — compute a set of rows