tutorial is only intended to give you an introduction and is in no
way a complete tutorial on
SQL . Numerous books
have been written on
SQL , including
- linkend="MELT93"> and 97">.
+ linkend="melt93"> and 97">.
You should be aware that some
PostgreSQL
language features are extensions to the standard.
In addition, you can define your own range types;
- see SQL-CREATETYPE"> for more information.
+ see sql-createtype"> for more information.
- See SQL-CREATETYPE"> for more information about creating
+ See sql-createtype"> for more information about creating
range types.
While UNIQUE is a natural constraint for scalar
values, it is usually unsuitable for range types. Instead, an
exclusion constraint is often more appropriate
- (see SQL-CREATETABLE-EXCLUDE">CREATE TABLE
+ (see sql-createtable-exclude">CREATE TABLE
... CONSTRAINT ... EXCLUDE). Exclusion constraints allow the
specification of constraints such as non-overlapping
on a
range type. For example:
PostgreSQL documentation
-->
-SQL-ABORT">
+sql-abort">
all the updates made by the transaction to be discarded.
This command is identical
in behavior to the standard
SQL command
- SQL-ROLLBACK">,
+ sql-rollback">,
and is present only for historical reasons.
Notes
- Use SQL-COMMIT"> to
+ Use sql-commit"> to
successfully terminate a transaction.
PostgreSQL documentation
-->
-SQL-ALTERAGGREGATE">
+sql-alteraggregate">
PostgreSQL documentation
-->
-SQL-ALTERCOLLATION">
+sql-altercollation">
PostgreSQL documentation
-->
-SQL-ALTERCONVERSION">
+sql-alterconversion">
PostgreSQL documentation
-->
-SQL-ALTERDATABASE">
+sql-alterdatabase">
PostgreSQL documentation
-->
-SQL-ALTERDEFAULTPRIVILEGES">
+sql-alterdefaultprivileges">
PostgreSQL documentation
-->
-SQL-ALTERDOMAIN">
+sql-alterdomain">
This form adds a new constraint to a domain using the same syntax as
- SQL-CREATEDOMAIN">.
+ sql-createdomain">.
When a new constraint is added to a domain, all columns using that
domain will be checked against the newly added constraint. These
checks can be suppressed by adding the new constraint using the
- SQL-ALTERDOMAIN-compatibility">
+ sql-alterdomain-compatibility">
Compatibility
- SQL-ALTERDOMAIN-see-also">
+ sql-alterdomain-see-also">
See Also
PostgreSQL documentation
-->
-SQL-ALTEREVENTTRIGGER">
+sql-altereventtrigger">
PostgreSQL documentation
-->
-SQL-ALTEREXTENSION">
+sql-alterextension">
- SQL-ALTEREXTENSION-see-also">
+ sql-alterextension-see-also">
See Also
PostgreSQL documentation
-->
-SQL-ALTERFOREIGNDATAWRAPPER">
+sql-alterforeigndatawrapper">
ALTER FOREIGN DATA WRAPPER
PostgreSQL documentation
-->
-SQL-ALTERFOREIGNTABLE">
+sql-alterforeigntable">
This form adds a new column to the foreign table, using the same syntax as
- SQL-CREATEFOREIGNTABLE">.
+ sql-createforeigntable">.
Unlike the case when adding a column to a regular table, nothing happens
to the underlying storage: this action simply declares that
some new column is now accessible through the foreign table.
This form adds a new constraint to a foreign table, using the same
- syntax as SQL-CREATEFOREIGNTABLE">.
+ syntax as sql-createforeigntable">.
Currently only CHECK constraints are supported.
done to verify the constraint is correct; rather, this action simply
declares that some new condition should be assumed to hold for all rows
in the foreign table. (See the discussion
- in SQL-CREATEFOREIGNTABLE">.)
+ in sql-createforeigntable">.)
If the constraint is marked NOT VALID , then it isn't
assumed to hold, but is only recorded for possible future use.
PostgreSQL documentation
-->
-SQL-ALTERFUNCTION">
+sql-alterfunction">
PostgreSQL documentation
-->
-SQL-ALTERGROUP">
+sql-altergroup">
group
for this purpose.) These variants are effectively
equivalent to granting or revoking membership in the role named as the
group
; so the preferred way to do this is to use
- SQL-GRANT"> or
- SQL-REVOKE">.
+ sql-grant"> or
+ sql-revoke">.
PostgreSQL documentation
-->
-SQL-ALTERINDEX">
+sql-alterindex">
this command, use ALTER DATABASE or explicit
ALTER INDEX invocations instead if desired.
See also
- SQL-CREATETABLESPACE">.
+ sql-createtablespace">.
This form changes one or more index-method-specific storage parameters
for the index. See
- SQL-CREATEINDEX">
+ sql-createindex">
for details on the available parameters. Note that the index contents
will not be modified immediately by this command; depending on the
parameter you might need to rebuild the index with
- SQL-REINDEX">
+ sql-reindex">
to get the desired effects.
These operations are also possible using
- SQL-ALTERTABLE">.
+ sql-altertable">.
ALTER INDEX is in fact just an alias for the forms
of ALTER TABLE that apply to indexes.
PostgreSQL documentation
-->
-SQL-ALTERLANGUAGE">
+sql-alterlanguage">
PostgreSQL documentation
-->
-SQL-ALTERLARGEOBJECT">
+sql-alterlargeobject">
PostgreSQL documentation
-->
-SQL-ALTERMATERIALIZEDVIEW">
+sql-altermaterializedview">
PostgreSQL documentation
-->
-SQL-ALTEROPCLASS">
+sql-alteropclass">
PostgreSQL documentation
-->
-SQL-ALTEROPERATOR">
+sql-alteroperator">
PostgreSQL documentation
-->
-SQL-ALTEROPFAMILY">
+sql-alteropfamily">
PostgreSQL documentation
-->
-SQL-ALTERPOLICY">
+sql-alterpolicy">
PostgreSQL documentation
-->
-SQL-ALTERPUBLICATION">
+sql-alterpublication">
This clause alters publication parameters originally set by
- SQL-CREATEPUBLICATION">. See there for more information.
+ sql-createpublication">. See there for more information.
PostgreSQL documentation
-->
-SQL-ALTERROLE">
+sql-alterrole">
.
(All the possible attributes are covered,
except that there are no options for adding or removing memberships; use
- SQL-GRANT"> and
- SQL-REVOKE"> for that.)
+ sql-grant"> and
+ sql-revoke"> for that.)
Attributes not mentioned in the command retain their previous settings.
Database superusers can change any of these settings for any role.
Roles having CREATEROLE privilege can change any of these
These clauses alter attributes originally set by
- SQL-CREATEROLE">. For more information, see the
+ sql-createrole">. For more information, see the
CREATE ROLE reference page.
Notes
- Use SQL-CREATEROLE">
- to add new roles, and SQL-DROPROLE"> to remove a role.
+ Use sql-createrole">
+ to add new roles, and sql-droprole"> to remove a role.
ALTER ROLE cannot change a role's memberships.
- Use SQL-GRANT"> and
- SQL-REVOKE">
+ Use sql-grant"> and
+ sql-revoke">
to do that.
PostgreSQL documentation
-->
-SQL-ALTERRULE">
+sql-alterrule">
PostgreSQL documentation
-->
-SQL-ALTERSCHEMA">
+sql-alterschema">
PostgreSQL documentation
-->
-SQL-ALTERSEQUENCE">
+sql-altersequence">
PostgreSQL documentation
-->
-SQL-ALTERSERVER">
+sql-alterserver">
PostgreSQL documentation
-->
-SQL-ALTERSTATISTICS">
+sql-alterstatistics">
PostgreSQL documentation
-->
-SQL-ALTERSUBSCRIPTION">
+sql-altersubscription">
This clause alters the connection property originally set by
- SQL-CREATESUBSCRIPTION">. See there for more
+ sql-createsubscription">. See there for more
information.
Changes list of subscribed publications. See
- SQL-CREATESUBSCRIPTION"> for more information.
+ sql-createsubscription"> for more information.
By default this command will also act like REFRESH
PUBLICATION.
This clause alters parameters originally set by
- SQL-CREATESUBSCRIPTION">. See there for more
+ sql-createsubscription">. See there for more
information. The allowed options are slot_name and
synchronous_commit
PostgreSQL documentation
-->
-SQL-ALTERSYSTEM">
+sql-altersystem">
See Also
- SQL-SET">
- SQL-SHOW">
+ sql-set">
+ sql-show">
PostgreSQL documentation
-->
-SQL-ALTERTABLE">
+sql-altertable">
This form adds a new column to the table, using the same syntax as
- SQL-CREATETABLE">. If IF NOT EXISTS
+ sql-createtable">. If IF NOT EXISTS
is specified and a column already exists with this name,
no error is thrown.
This form adds a new constraint to a table using the same syntax as
- SQL-CREATETABLE">, plus the option NOT
+ sql-createtable">, plus the option NOT
VALID, which is currently only allowed for foreign key
and CHECK constraints.
If the constraint is marked NOT VALID , the
even if row level security is disabled - in this case, the policies will
NOT be applied and the policies will be ignored.
See also
- SQL-CREATEPOLICY">.
+ sql-createpolicy">.
disabled (the default) then row level security will not be applied when
the user is the table owner.
See also
- SQL-CREATEPOLICY">.
+ sql-createpolicy">.
This form selects the default index for future
- SQL-CLUSTER">
+ sql-cluster">
operations. It does not actually re-cluster the table.
This form removes the most recently used
- SQL-CLUSTER">
+ sql-cluster">
index specification from the table. This affects
future cluster operations that don't specify an index.
information_schema relations are not considered part
of the system catalogs and will be moved.
See also
- SQL-CREATETABLESPACE">.
+ sql-createtablespace">.
This form changes the table from unlogged to logged or vice-versa
- (see SQL-CREATETABLE-UNLOGGED">). It cannot be applied
+ (see sql-createtable-unlogged">). It cannot be applied
to a temporary table.
This form changes one or more storage parameters for the table. See
- SQL-CREATETABLE-storage-parameters"
- endterm="SQL-CREATETABLE -storage-parameters-title">
+ sql-createtable-storage-parameters"
+ endterm="sql-createtable -storage-parameters-title">
for details on the available parameters. Note that the table contents
will not be modified immediately by this command; depending on the
parameter you might need to rewrite the table to get the desired effects.
- That can be done with SQL-VACUUM">VACUUM
- FULL, SQL-CLUSTER"> or one of the forms
+ That can be done with sql-vacuum">VACUUM
+ FULL, sql-cluster"> or one of the forms
of ALTER TABLE that forces a table rewrite.
For planner related parameters, changes will take effect from the next
time the table is locked so currently executing queries will not be
- SQL-CREATETABLE-REPLICA-IDENTITY">
+ sql-createtable-replica-identity">
REPLICA IDENTITY
If the new partition is a foreign table, nothing is done to verify
that all the rows in the foreign table obey the partition constraint.
- (See the discussion in SQL-CREATEFOREIGNTABLE"> about
+ (See the discussion in sql-createforeigntable"> about
constraints on the foreign table.)
PostgreSQL documentation
-->
-SQL-ALTERTABLESPACE">
+sql-altertablespace">
PostgreSQL documentation
-->
-SQL-ALTERTRIGGER">
+sql-altertrigger">
The ability to temporarily enable or disable a trigger is provided by
- SQL-ALTERTABLE">, not by
+ sql-altertable">, not by
ALTER TRIGGER , because ALTER TRIGGER has no
convenient way to express the option of enabling or disabling all of
a table's triggers at once.
PostgreSQL documentation
-->
-SQL-ALTERTSCONFIG">
+sql-altertsconfig">
ALTER TEXT SEARCH CONFIGURATION
PostgreSQL documentation
-->
-SQL-ALTERTSDICTIONARY">
+sql-altertsdictionary">
ALTER TEXT SEARCH DICTIONARY
PostgreSQL documentation
-->
-SQL-ALTERTSPARSER">
+sql-altertsparser">
PostgreSQL documentation
-->
-SQL-ALTERTSTEMPLATE">
+sql-altertstemplate">
ALTER TEXT SEARCH TEMPLATE
PostgreSQL documentation
-->
-SQL-ALTERTYPE">
+sql-altertype">
This form adds a new attribute to a composite type, using the same syntax as
- SQL-CREATETYPE">.
+ sql-createtype">.
- SQL-ALTERTYPE-see-also">
+ sql-altertype-see-also">
See Also
PostgreSQL documentation
-->
-SQL-ALTERUSER">
+sql-alteruser">
PostgreSQL documentation
-->
-SQL-ALTERUSERMAPPING">
+sql-alterusermapping">
PostgreSQL documentation
-->
-SQL-ALTERVIEW">
+sql-alterview">
PostgreSQL documentation
-->
-SQL-ANALYZE">
+sql-analyze">
PostgreSQL documentation
-->
-SQL-BEGIN">
+sql-begin">
- Use SQL-COMMIT"> or
- SQL-ROLLBACK">
+ Use sql-commit"> or
+ sql-rollback">
to terminate a transaction block.
PostgreSQL documentation
-->
-SQL-CLOSE">
+sql-close">
PostgreSQL documentation
-->
-SQL-CLUSTER">
+sql-cluster">
CLUSTER table_name
reclusters the table using the same index as before. You can also
use the CLUSTER or SET WITHOUT CLUSTER
- forms of SQL-ALTERTABLE"> to set the index to be used for
+ forms of sql-altertable"> to set the index to be used for
future cluster operations, or to clear any previous setting.
PostgreSQL documentation
-->
-APP-CLUSTERDB">
+app-clusterdb">
clusterdb is a wrapper around the SQL
- command SQL-CLUSTER">.
+ command sql-cluster">.
There is no effective difference between clustering databases via
this utility and via other methods for accessing the server.
Diagnostics
- In case of difficulty, see SQL-CLUSTER">
- and APP-PSQL"> for
+ In case of difficulty, see sql-cluster">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-SQL-COMMENT">
+sql-comment">
PostgreSQL documentation
-->
-SQL-COMMIT">
+sql-commit">
Notes
- Use SQL-ROLLBACK"> to
+ Use sql-rollback"> to
abort a transaction.
PostgreSQL documentation
-->
-SQL-COMMIT-PREPARED">
+sql-commit-prepared">
-->
-SQL-COPY">
+sql-copy">
Do not confuse COPY with the
- APP-PSQL-meta-commands-copy">\copy . \copy invokes
+ app-psql-meta-commands-copy">\copy . \copy invokes
COPY FROM STDIN or COPY TO
STDOUT, and then fetches/stores the data in a file
accessible to the
psql client. Thus,
PostgreSQL documentation
-->
-SQL-CREATEAGGREGATE">
+sql-createaggregate">
-SQL-CREATECAST">
+sql-createcast">
-SQL-CREATECOLLATION">
+sql-createcollation">
-SQL-CREATECONVERSION">
+sql-createconversion">
PostgreSQL documentation
-->
-SQL-CREATEDATABASE">
+sql-createdatabase">
To create a database, you must be a superuser or have the special
CREATEDB privilege.
- See SQL-CREATEUSER">.
+ See sql-createuser">.
- Use SQL-DROPDATABASE"> to remove a database.
+ Use sql-dropdatabase"> to remove a database.
- The program APP-CREATEDB"> is a
+ The program app-createdb"> is a
wrapper program around this command, provided for convenience.
PostgreSQL documentation
-->
-SQL-CREATEDOMAIN">
+sql-createdomain">
- SQL-CREATEDOMAIN-compatibility">
+ sql-createdomain-compatibility">
Compatibility
- SQL-CREATEDOMAIN-see-also">
+ sql-createdomain-see-also">
See Also
PostgreSQL documentation
-->
-SQL-CREATEEVENTTRIGGER">
+sql-createeventtrigger">
PostgreSQL documentation
-->
-SQL-CREATEEXTENSION">
+sql-createextension">
PostgreSQL documentation
-->
-SQL-CREATEFOREIGNDATAWRAPPER">
+sql-createforeigndatawrapper">
CREATE FOREIGN DATA WRAPPER
-SQL-CREATEFOREIGNTABLE">
+sql-createforeigntable">
- SQL-CREATEFOREIGNTABLE-description">
+ sql-createforeigntable-description">
Description
The name of an existing foreign server to use for the foreign table.
For details on defining a server, see
- linkend="SQL-CREATESERVER ">.
+ linkend="sql-createserver ">.
- SQL-CREATEFOREIGNTABLE-examples">
+ sql-createforeigntable-examples">
Examples
- SQL-CREATEFOREIGNTABLE-compatibility">
-
SQL-CREATEFOREIGNTABLE-compatibility-title">Compatibility
+ sql-createforeigntable-compatibility">
+
sql-createforeigntable-compatibility-title">Compatibility
The CREATE FOREIGN TABLE command largely conforms to the
doc/src/sgml/ref/create_function.sgml
-->
-SQL-CREATEFUNCTION">
+sql-createfunction">
the SQL function. The string
class="parameter">obj_file is the name of the shared
library file containing the compiled C function, and is interpreted
- as for the SQL-LOAD"> command. The string
+ as for the sql-load"> command. The string
link_symbol is the
function's link symbol, that is, the name of the function in the C
language source code. If the link symbol is omitted, it is assumed
PostgreSQL documentation
-->
-SQL-CREATEGROUP">
+sql-creategroup">
PostgreSQL documentation
-->
-SQL-CREATEINDEX">
+sql-createindex">
updates, or deletes on the table; whereas a standard index build
locks out writes (but not reads) on the table until it's done.
There are several caveats to be aware of when using this option
- — see SQL-CREATEINDEX-CONCURRENTLY"
- endterm="SQL-CREATEINDEX-CONCURRENTLY -title">.
+ — see sql-createindex-concurrently"
+ endterm="sql-createindex-concurrently -title">.
- SQL-CREATEINDEX-storage-parameters">
-
SQL-CREATEINDEX-storage-parameters-title">Index Storage Parameters
+ sql-createindex-storage-parameters">
+
sql-createindex-storage-parameters-title">Index Storage Parameters
The optional WITH clause specifies storage
- SQL-CREATEINDEX-CONCURRENTLY">
-
SQL-CREATEINDEX-CONCURRENTLY-title">Building Indexes Concurrently
+ sql-createindex-concurrently">
+
sql-createindex-concurrently-title">Building Indexes Concurrently
- SQL-CREATEINDEX-CONCURRENTLY">
+ sql-createindex-concurrently">
building concurrently
PostgreSQL documentation
-->
-SQL-CREATELANGUAGE">
+sql-createlanguage">
PostgreSQL documentation
-->
-SQL-CREATEMATERIALIZEDVIEW">
+sql-creatematerializedview">
PostgreSQL documentation
-->
-SQL-CREATEOPCLASS">
+sql-createopclass">
PostgreSQL documentation
-->
-SQL-CREATEOPERATOR">
+sql-createoperator">
PostgreSQL documentation
-->
-SQL-CREATEOPFAMILY">
+sql-createopfamily">
PostgreSQL documentation
-->
-SQL-CREATEPOLICY">
+sql-createpolicy">
- SQL-CREATEPOLICY-ALL">
+ sql-createpolicy-all">
ALL
- SQL-CREATEPOLICY-SELECT">
+ sql-createpolicy-select">
SELECT
- SQL-CREATEPOLICY-INSERT">
+ sql-createpolicy-insert">
INSERT
- SQL-CREATEPOLICY-UPDATE">
+ sql-createpolicy-update">
UPDATE
- SQL-CREATEPOLICY-DELETE">
+ sql-createpolicy-delete">
DELETE
PostgreSQL documentation
-->
-SQL-CREATEPUBLICATION">
+sql-createpublication">
PostgreSQL documentation
-->
-SQL-CREATEROLE">
+sql-createrole">
Notes
- Use SQL-ALTERROLE"> to
- change the attributes of a role, and SQL-DROPROLE">
+ Use sql-alterrole"> to
+ change the attributes of a role, and sql-droprole">
to remove a role. All the attributes
specified by CREATE ROLE can be modified by later
ALTER ROLE commands.
The preferred way to add and remove members of roles that are being
used as groups is to use
- SQL-GRANT"> and
- SQL-REVOKE">.
+ sql-grant"> and
+ sql-revoke">.
a member of a role with CREATEDB privilege does not immediately
grant the ability to create databases, even if INHERIT is set;
it would be necessary to become that role via
- SQL-SET-ROLE"> before
+ sql-set-role"> before
creating a database.
PostgreSQL includes a program
- linkend="APP-CREATEUSER "> that has
+ linkend="app-createuser "> that has
the same functionality as CREATE ROLE (in fact,
it calls this command) but can be run from the command shell.
with this command. The password will be transmitted to the server
in cleartext, and it might also be logged in the client's command
history or the server log. The command
- linkend="APP-CREATEUSER ">, however, transmits
+ linkend="app-createuser ">, however, transmits
the password encrypted. Also,
contains a command
\password that can be used to safely change the
PostgreSQL documentation
-->
-SQL-CREATERULE">
+sql-createrule">
PostgreSQL documentation
-->
-SQL-CREATESCHEMA">
+sql-createschema">
PostgreSQL documentation
-->
-SQL-CREATESEQUENCE">
+sql-createsequence">
PostgreSQL documentation
-->
-SQL-CREATESERVER">
+sql-createserver">
PostgreSQL documentation
-->
-SQL-CREATESTATISTICS">
+sql-createstatistics">
- SQL-CREATESTATISTICS-description">
+ sql-createstatistics-description">
Description
- SQL-CREATESTATISTICS-examples">
+ sql-createstatistics-examples">
Examples
PostgreSQL documentation
-->
-SQL-CREATESUBSCRIPTION">
+sql-createsubscription">
PostgreSQL documentation
-->
-SQL-CREATETABLE">
+sql-createtable">
- SQL-CREATETABLE-description">
+ sql-createtable-description">
Description
- SQL-CREATETABLE-TEMPORARY">
+ sql-createtable-temporary">
TEMPORARY or TEMP
- SQL-CREATETABLE-UNLOGGED">
+ sql-createtable-unlogged">
UNLOGGED
- SQL-CREATETABLE-PARTITION">
+ sql-createtable-partition">
PARTITION OF parent_table { FOR VALUES partition_bound_spec | DEFAULT }
- SQL-CREATETABLE-EXCLUDE">
+ sql-createtable-exclude">
EXCLUDE [ USING index_method ] ( exclude_element WITH operator [, ... ] ) index_parameters [ WHERE ( predicate ) ]
- SQL-CREATETABLE-storage-parameters">
-
SQL-CREATETABLE-storage-parameters-title">Storage Parameters
+ sql-createtable-storage-parameters">
+
sql-createtable-storage-parameters-title">Storage Parameters
for tables, and for indexes associated with a UNIQUE ,
PRIMARY KEY , or EXCLUDE constraint.
Storage parameters for
- indexes are documented in SQL-CREATEINDEX">.
+ indexes are documented in sql-createindex">.
The storage parameters currently
available for tables are listed below. For many of these parameters, as
shown, there is an additional parameter with the same name prefixed with
- SQL-CREATETABLE-notes">
+ sql-createtable-notes">
Notes
- SQL-CREATETABLE-examples">
+ sql-createtable-examples">
Examples
- SQL-CREATETABLE-compatibility">
-
SQL-CREATETABLE-compatibility-title">Compatibility
+ sql-createtable-compatibility">
+
sql-createtable-compatibility-title">Compatibility
The CREATE TABLE command conforms to the
PostgreSQL documentation
-->
-SQL-CREATETABLEAS">
+sql-createtableas">
PostgreSQL documentation
-->
-SQL-CREATETABLESPACE">
+sql-createtablespace">
-SQL-CREATETRANSFORM">
+sql-createtransform">
PostgreSQL documentation
-->
-SQL-CREATETRIGGER">
+sql-createtrigger">
When the CONSTRAINT option is specified, this command creates a
constraint trigger . This is the same as a regular trigger
except that the timing of the trigger firing can be adjusted using
- SQL-SET-CONSTRAINTS">.
+ sql-set-constraints">.
Constraint triggers must be AFTER ROW triggers on plain
tables (not foreign tables). They
can be fired either at the end of the statement causing the triggering
The default timing of the trigger.
- See the SQL-CREATETABLE"> documentation for details of
+ See the sql-createtable"> documentation for details of
these constraint options. This can only be specified for constraint
triggers.
- SQL-CREATETRIGGER-notes">
+ sql-createtrigger-notes">
Notes
- SQL-CREATETRIGGER-examples">
+ sql-createtrigger-examples">
Examples
- SQL-CREATETRIGGER-compatibility">
+ sql-createtrigger-compatibility">
Compatibility
-SQL-CREATETSCONFIG">
+sql-createtsconfig">
CREATE TEXT SEARCH CONFIGURATION
PostgreSQL documentation
-->
-SQL-CREATETSDICTIONARY">
+sql-createtsdictionary">
CREATE TEXT SEARCH DICTIONARY
PostgreSQL documentation
-->
-SQL-CREATETSPARSER">
+sql-createtsparser">
CREATE TEXT SEARCH PARSER
PostgreSQL documentation
-->
-SQL-CREATETSTEMPLATE">
+sql-createtstemplate">
CREATE TEXT SEARCH TEMPLATE
PostgreSQL documentation
-->
-SQL-CREATETYPE">
+sql-createtype">
- SQL-CREATETYPE-enum">
+ sql-createtype-enum">
Enumerated Types
- SQL-CREATETYPE-RANGE">
+ sql-createtype-range">
Range Types
- SQL-CREATETYPE-notes">
+ sql-createtype-notes">
Notes
- SQL-CREATETYPE-compatibility">
+ sql-createtype-compatibility">
Compatibility
- SQL-CREATETYPE-see-also">
+ sql-createtype-see-also">
See Also
PostgreSQL documentation
-->
-SQL-CREATEUSER">
+sql-createuser">
PostgreSQL documentation
-->
-SQL-CREATEUSERMAPPING">
+sql-createusermapping">
PostgreSQL documentation
-->
-SQL-CREATEVIEW">
+sql-createview">
WITH [ CASCADED | LOCAL ] CHECK OPTION
- SQL-CREATEVIEW">
+ sql-createview">
- SQL-CREATEVIEW">
+ sql-createview">
to replace it (this includes being a member of the owning role).
- SQL-CREATEVIEW-updatable-views">
-
SQL-CREATEVIEW-updatable-views-title">Updatable Views
+ sql-createview-updatable-views">
+
sql-createview-updatable-views-title">Updatable Views
PostgreSQL documentation
-->
-APP-CREATEDB">
+app-createdb">
- R1-APP-CREATEDB-1">
+ r1-app-createdb-1">
Description
createdb is a wrapper around the
-
SQL command
SQL-CREATEDATABASE">.
+
SQL command
sql-createdatabase">.
There is no effective difference between creating databases via
this utility and via other methods for accessing the server.
The options -D , -l , -E ,
-O , and
-T correspond to options of the underlying
- SQL command SQL-CREATEDATABASE">; see there for more information
+ SQL command sql-createdatabase">; see there for more information
about them.
Diagnostics
- In case of difficulty, see SQL-CREATEDATABASE">
- and APP-PSQL"> for
+ In case of difficulty, see sql-createdatabase">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-APP-CREATEUSER">
+app-createuser">
createuser is a wrapper around the
-
SQL command
SQL-CREATEROLE">.
+
SQL command
sql-createrole">.
There is no effective difference between creating users via
this utility and via other methods for accessing the server.
Diagnostics
- In case of difficulty, see SQL-CREATEROLE">
- and APP-PSQL"> for
+ In case of difficulty, see sql-createrole">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-SQL-DEALLOCATE">
+sql-deallocate">
PostgreSQL documentation
-->
-SQL-DECLARE">
+sql-declare">
PostgreSQL documentation
-->
-SQL-DELETE">
+sql-delete">
PostgreSQL documentation
-->
-SQL-DISCARD">
+sql-discard">
PostgreSQL documentation
-->
-SQL-DO">
+sql-do">
PostgreSQL documentation
-->
-SQL-DROPAGGREGATE">
+sql-dropaggregate">
-SQL-DROPCAST">
+sql-dropcast">
-SQL-DROPCOLLATION">
+sql-dropcollation">
-SQL-DROPCONVERSION">
+sql-dropconversion">
PostgreSQL documentation
-->
-SQL-DROPDATABASE">
+sql-dropdatabase">
PostgreSQL documentation
-->
-SQL-DROPDOMAIN">
+sql-dropdomain">
- SQL-DROPDOMAIN-examples">
+ sql-dropdomain-examples">
Examples
- SQL-DROPDOMAIN-compatibility">
+ sql-dropdomain-compatibility">
Compatibility
- SQL-DROPDOMAIN-see-also">
+ sql-dropdomain-see-also">
See Also
PostgreSQL documentation
-->
-SQL-DROPEVENTTRIGGER">
+sql-dropeventtrigger">
PostgreSQL documentation
-->
-SQL-DROPEXTENSION">
+sql-dropextension">
PostgreSQL documentation
-->
-SQL-DROPFOREIGNDATAWRAPPER">
+sql-dropforeigndatawrapper">
DROP FOREIGN DATA WRAPPER
-SQL-DROPFOREIGNTABLE">
+sql-dropforeigntable">
PostgreSQL documentation
-->
-SQL-DROPFUNCTION">
+sql-dropfunction">
- SQL-DROPFUNCTION-examples">
+ sql-dropfunction-examples">
Examples
- SQL-DROPFUNCTION-compatibility">
+ sql-dropfunction-compatibility">
Compatibility
PostgreSQL documentation
-->
-SQL-DROPGROUP">
+sql-dropgroup">
PostgreSQL documentation
-->
-SQL-DROPINDEX">
+sql-dropindex">
PostgreSQL documentation
-->
-SQL-DROPLANGUAGE">
+sql-droplanguage">
PostgreSQL documentation
-->
-SQL-DROPMATERIALIZEDVIEW">
+sql-dropmaterializedview">
PostgreSQL documentation
-->
-SQL-DROPOPCLASS">
+sql-dropopclass">
PostgreSQL documentation
-->
-SQL-DROPOPERATOR">
+sql-dropoperator">
PostgreSQL documentation
-->
-SQL-DROPOPFAMILY">
+sql-dropopfamily">
PostgreSQL documentation
-->
-SQL-DROP-OWNED">
+sql-drop-owned">
PostgreSQL documentation
-->
-SQL-DROPPOLICY">
+sql-droppolicy">
PostgreSQL documentation
-->
-SQL-DROPPUBLICATION">
+sql-droppublication">
PostgreSQL documentation
-->
-SQL-DROPROLE">
+sql-droprole">
PostgreSQL includes a program
- linkend="APP-DROPUSER "> that has the
+ linkend="app-dropuser "> that has the
same functionality as this command (in fact, it calls this command)
but can be run from the command shell.
PostgreSQL documentation
-->
-SQL-DROPRULE">
+sql-droprule">
PostgreSQL documentation
-->
-SQL-DROPSCHEMA">
+sql-dropschema">
PostgreSQL documentation
-->
-SQL-DROPSEQUENCE">
+sql-dropsequence">
PostgreSQL documentation
-->
-SQL-DROPSERVER">
+sql-dropserver">
PostgreSQL documentation
-->
-SQL-DROPSTATISTICS">
+sql-dropstatistics">
PostgreSQL documentation
-->
-SQL-DROPSUBSCRIPTION">
+sql-dropsubscription">
PostgreSQL documentation
-->
-SQL-DROPTABLE">
+sql-droptable">
PostgreSQL documentation
-->
-SQL-DROPTABLESPACE">
+sql-droptablespace">
-SQL-DROPTRANSFORM">
+sql-droptransform">
PostgreSQL documentation
-->
-SQL-DROPTRIGGER">
+sql-droptrigger">
- SQL-DROPTRIGGER-examples">
+ sql-droptrigger-examples">
Examples
- SQL-DROPTRIGGER-compatibility">
+ sql-droptrigger-compatibility">
Compatibility
PostgreSQL documentation
-->
-SQL-DROPTSCONFIG">
+sql-droptsconfig">
DROP TEXT SEARCH CONFIGURATION
PostgreSQL documentation
-->
-SQL-DROPTSDICTIONARY">
+sql-droptsdictionary">
DROP TEXT SEARCH DICTIONARY
PostgreSQL documentation
-->
-SQL-DROPTSPARSER">
+sql-droptsparser">
PostgreSQL documentation
-->
-SQL-DROPTSTEMPLATE">
+sql-droptstemplate">
DROP TEXT SEARCH TEMPLATE
PostgreSQL documentation
-->
-SQL-DROPTYPE">
+sql-droptype">
- SQL-DROPTYPE-examples">
+ sql-droptype-examples">
Examples
- SQL-DROPTYPE-compatibility">
+ sql-droptype-compatibility">
Compatibility
- SQL-DROPTYPE-see-also">
+ sql-droptype-see-also">
See Also
PostgreSQL documentation
-->
-SQL-DROPUSER">
+sql-dropuser">
PostgreSQL documentation
-->
-SQL-DROPUSERMAPPING">
+sql-dropusermapping">
PostgreSQL documentation
-->
-SQL-DROPVIEW">
+sql-dropview">
PostgreSQL documentation
-->
-APP-DROPDB">
+app-dropdb">
dropdb is a wrapper around the
-
SQL command
SQL-DROPDATABASE">.
+
SQL command
sql-dropdatabase">.
There is no effective difference between dropping databases via
this utility and via other methods for accessing the server.
Diagnostics
- In case of difficulty, see SQL-DROPDATABASE">
- and APP-PSQL"> for
+ In case of difficulty, see sql-dropdatabase">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-APP-DROPUSER">
+app-dropuser">
dropuser is a wrapper around the
-
SQL command
SQL-DROPROLE">.
+
SQL command
sql-droprole">.
There is no effective difference between dropping users via
this utility and via other methods for accessing the server.
Diagnostics
- In case of difficulty, see SQL-DROPROLE">
- and APP-PSQL"> for
+ In case of difficulty, see sql-droprole">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-APP-ECPG">
+app-ecpg">
- APP-ECPG-description">
+ app-ecpg-description">
Description
PostgreSQL documentation
-->
-SQL-END">
+sql-end">
Notes
- Use SQL-ROLLBACK"> to
+ Use sql-rollback"> to
abort a transaction.
PostgreSQL documentation
-->
-SQL-EXECUTE">
+sql-execute">
PostgreSQL documentation
-->
-SQL-EXPLAIN">
+sql-explain">
PostgreSQL documentation
-->
-SQL-FETCH">
+sql-fetch">
PostgreSQL documentation
-->
-SQL-GRANT">
+sql-grant">
- SQL-GRANT-notes">
+ sql-grant-notes">
Notes
PostgreSQL documentation
-->
-SQL-IMPORTFOREIGNSCHEMA">
+sql-importforeignschema">
- SQL-IMPORTFOREIGNSCHEMA-description">
+ sql-importforeignschema-description">
Description
- SQL-IMPORTFOREIGNSCHEMA-examples">
+ sql-importforeignschema-examples">
Examples
- SQL-IMPORTFOREIGNSCHEMA-compatibility">
+ sql-importforeignschema-compatibility">
Compatibility
PostgreSQL documentation
-->
-APP-INITDB">
+app-initdb">
- R1-APP-INITDB-1">
+ r1-app-initdb-1">
Description
PostgreSQL documentation
-->
-SQL-INSERT">
+sql-insert">
Parameters
- SQL-INSERTING-PARAMS">
+ sql-inserting-params">
Inserting
ON CONFLICT Clause
- SQL-INSERT">
+ sql-insert">
- SQL-INSERT">
+ sql-insert">
PostgreSQL documentation
-->
-SQL-LISTEN">
+sql-listen">
doc/src/sgml/ref/load.sgml
-->
-SQL-LOAD">
+sql-load">
PostgreSQL documentation
-->
-SQL-LOCK">
+sql-lock">
There is no LOCK TABLE in the SQL standard,
which instead uses SET TRANSACTION to specify
concurrency levels on transactions.
PostgreSQL supports that too;
- see SQL-SET-TRANSACTION"> for details.
+ see sql-set-transaction"> for details.
PostgreSQL documentation
-->
-SQL-MOVE">
+sql-move">
PostgreSQL documentation
-->
-SQL-NOTIFY">
+sql-notify">
out of backup mode automatically. Backups are always taken of the entire
database cluster; it is not possible to back up individual databases or
database objects. For individual database backups, a tool such as
- APP-PGDUMP"> must be used.
+ app-pgdump"> must be used.
See Also
- APP-PGDUMP">
+ app-pgdump">
PostgreSQL documentation
-->
-APP-PGCONTROLDATA">
+app-pgcontroldata">
- R1-APP-PGCONTROLDATA-1">
+ r1-app-pgcontroldata-1">
Description
pg_controldata prints information initialized during
- R1-APP-PGCTL-2">
+ r1-app-pgctl-2">
Examples
- R2-APP-PGCTL-3">
+ r2-app-pgctl-3">
Starting the Server
- R2-APP-PGCTL-4">
+ r2-app-pgctl-4">
Stopping the Server
To stop the server, use:
- R2-APP-PGCTL-5">
+ r2-app-pgctl-5">
Restarting the Server
- R2-APP-PGCTL-6">
+ r2-app-pgctl-6">
Showing the Server Status
PostgreSQL documentation
-->
-APP-PGDUMP">
+app-pgdump">
schema parameter is
interpreted as a pattern according to the same rules used by
psql 's
\d commands (see
- linkend="APP-PSQL-patterns" endterm="APP-PSQL -patterns-title">),
+ linkend="app-psql-patterns" endterm="app-psql -patterns-title">),
so multiple schemas can also be selected by writing wildcard characters
in the pattern. When using wildcards, be careful to quote the pattern
if needed to prevent the shell from expanding the wildcards; see
table parameter is
interpreted as a pattern according to the same rules used by
psql 's
\d commands (see
- linkend="APP-PSQL-patterns" endterm="APP-PSQL -patterns-title">),
+ linkend="app-psql-patterns" endterm="app-psql -patterns-title">),
so multiple tables can also be selected by writing wildcard characters
in the pattern. When using wildcards, be careful to quote the pattern
if needed to prevent the shell from expanding the wildcards; see
To specify an upper-case or mixed-case name in -t and related
switches, you need to double-quote the name; else it will be folded to
lower case (see
- linkend="APP-PSQL-patterns" endterm="APP-PSQL -patterns-title">). But
+ linkend="app-psql-patterns" endterm="app-psql -patterns-title">). But
double quotes are special to the shell, so in turn they must be quoted.
Thus, to dump a single table with a mixed-case name, you need something
like
PostgreSQL documentation
-->
-APP-PG-DUMPALL">
+app-pg-dumpall">
See Also
- APP-PGBASEBACKUP">
+ app-pgbasebackup">
The database to connect to. See the description of the actions for
what this means in detail. This can be a
libpq connection string;
- see LIBPQ-CONNSTRING"> for more information. Defaults
+ see libpq-connstring"> for more information. Defaults
to user name.
PostgreSQL documentation
-->
-APP-PGRESETWAL">
+app-pgresetwal">
- R1-APP-PGRESETWAL-1">
+ r1-app-pgresetwal-1">
Description
pg_resetwal clears the write-ahead log (WAL) and
-APP-PGRESTORE">
+app-pgrestore">
- R1-APP-PGWALDUMP-1">
+ r1-app-pgwaldump-1">
Description
pg_waldump displays the write-ahead log (WAL) and is mainly
PostgreSQL documentation
-->
-SQL-PREPARE">
+sql-prepare">
- SQL-PREPARE-notes">
+ sql-prepare-notes">
Notes
PostgreSQL documentation
-->
-SQL-PREPARE-TRANSACTION">
+sql-prepare-transaction">
PostgreSQL documentation
-->
-APP-PSQL">
+app-psql">
- R1-APP-PSQL-3">
+ r1-app-psql-3">
Options
Usage
- R2-APP-PSQL-connecting">
+ r2-app-psql-connecting">
Connecting to a Database
- R2-APP-PSQL-4">
+ r2-app-psql-4">
Entering SQL Commands
Whenever a command is executed,
psql also polls
for asynchronous notification events generated by
- SQL-LISTEN"> and
- SQL-NOTIFY">.
+ sql-listen"> and
+ sql-notify">.
- APP-PSQL-meta-commands">
+ app-psql-meta-commands">
Meta-Commands
If an unquoted colon (: ) followed by a
psql variable name appears within an argument, it is
replaced by the variable's value, as described in
- linkend="APP-PSQL-interpolation" endterm="APP-PSQL -interpolation-title">.
+ linkend="app-psql-interpolation" endterm="app-psql -interpolation-title">.
The forms :'variable_name ' and
:"variable_name " described there
work as well.
- APP-PSQL-meta-commands-copy">
+ app-psql-meta-commands-copy">
\copy { table [ ( column_list ) ] | ( query ) }
{ from | to }
{ 'filename' | program 'command' | stdin | stdout | pstdin | pstdout }
Performs a frontend (client) copy. This is an operation that
command, but instead of the server
reading or writing the specified file,
psql reads or writes the file and
- APP-PSQL-meta-commands-crosstabview">
+ app-psql-meta-commands-crosstabview">
\crosstabview [
colV
[ colH
- \d[S+] [ APP-PSQL-patterns">pattern ]
+ \d[S+] [ app-psql-patterns">pattern ]
also shown. For foreign tables, the associated foreign
server is shown as well.
(Matching the pattern
is defined in
- APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">
+ app-psql-patterns" endterm="app-psql-patterns-title">
below.)
more information is displayed: any comments associated with the
columns of the table are shown, as is the presence of OIDs in the
table, the view definition if the relation is a view, a non-default
- SQL-CREATETABLE-REPLICA-IDENTITY">replica
+ sql-createtable-replica-identity">replica
identity setting.
- \da[S] [ APP-PSQL-patterns">pattern ]
+ \da[S] [ app-psql-patterns">pattern ]
- \dA[+] [ APP-PSQL-patterns">pattern ]
+ \dA[+] [ app-psql-patterns">pattern ]
- \db[+] [ APP-PSQL-patterns">pattern ]
+ \db[+] [ app-psql-patterns">pattern ]
- \dc[S+] [ APP-PSQL-patterns">pattern ]
+ \dc[S+] [ app-psql-patterns">pattern ]
Lists conversions between character-set encodings.
- \dC[+] [ APP-PSQL-patterns">pattern ]
+ \dC[+] [ app-psql-patterns">pattern ]
Lists type casts.
- \dd[S] [ APP-PSQL-patterns">pattern ]
+ \dd[S] [ app-psql-patterns">pattern ]
Shows the descriptions of objects of type constraint ,
- \dD[S+] [ APP-PSQL-patterns">pattern ]
+ \dD[S+] [ app-psql-patterns">pattern ]
Lists domains. If
- \ddp [ APP-PSQL-patterns">pattern ]
+ \ddp [ app-psql-patterns">pattern ]
Lists default access privilege settings. An entry is shown for
- \dE[S+] [ APP-PSQL-patterns">pattern ]
- \di[S+] [ APP-PSQL-patterns">pattern ]
- \dm[S+] [ APP-PSQL-patterns">pattern ]
- \ds[S+] [ APP-PSQL-patterns">pattern ]
- \dt[S+] [ APP-PSQL-patterns">pattern ]
- \dv[S+] [ APP-PSQL-patterns">pattern ]
+ \dE[S+] [ app-psql-patterns">pattern ]
+ \di[S+] [ app-psql-patterns">pattern ]
+ \dm[S+] [ app-psql-patterns">pattern ]
+ \ds[S+] [ app-psql-patterns">pattern ]
+ \dt[S+] [ app-psql-patterns">pattern ]
+ \dv[S+] [ app-psql-patterns">pattern ]
- \des[+] [ APP-PSQL-patterns">pattern ]
+ \des[+] [ app-psql-patterns">pattern ]
Lists foreign servers (mnemonic: external
- \det[+] [ APP-PSQL-patterns">pattern ]
+ \det[+] [ app-psql-patterns">pattern ]
Lists foreign tables (mnemonic: external tables
).
- \deu[+] [ APP-PSQL-patterns">pattern ]
+ \deu[+] [ app-psql-patterns">pattern ]
Lists user mappings (mnemonic: external
- \dew[+] [ APP-PSQL-patterns">pattern ]
+ \dew[+] [ app-psql-patterns">pattern ]
Lists foreign-data wrappers (mnemonic: external
- \df[antwS+] [ APP-PSQL-patterns">pattern ]
+ \df[antwS+] [ app-psql-patterns">pattern ]
- \dF[+] [ APP-PSQL-patterns">pattern ]
+ \dF[+] [ app-psql-patterns">pattern ]
Lists text search configurations.
- \dFd[+] [ APP-PSQL-patterns">pattern ]
+ \dFd[+] [ app-psql-patterns">pattern ]
Lists text search dictionaries.
- \dFp[+] [ APP-PSQL-patterns">pattern ]
+ \dFp[+] [ app-psql-patterns">pattern ]
Lists text search parsers.
- \dFt[+] [ APP-PSQL-patterns">pattern ]
+ \dFt[+] [ app-psql-patterns">pattern ]
Lists text search templates.
- \dg[S+] [ APP-PSQL-patterns">pattern ]
+ \dg[S+] [ app-psql-patterns">pattern ]
Lists database roles.
- \dL[S+] [ APP-PSQL-patterns">pattern ]
+ \dL[S+] [ app-psql-patterns">pattern ]
Lists procedural languages. If
- \dn[S+] [ APP-PSQL-patterns">pattern ]
+ \dn[S+] [ app-psql-patterns">pattern ]
- \do[S+] [ APP-PSQL-patterns">pattern ]
+ \do[S+] [ app-psql-patterns">pattern ]
Lists operators with their operand and result types.
- \dO[S+] [ APP-PSQL-patterns">pattern ]
+ \dO[S+] [ app-psql-patterns">pattern ]
Lists collations.
- \dp [ APP-PSQL-patterns">pattern ]
+ \dp [ app-psql-patterns">pattern ]
Lists tables, views and sequences with their
- \drds [ APP-PSQL-patterns">role-pattern [ -patterns">database-pattern ] ]
+ \drds [ app-psql-patterns">role-pattern [ -patterns">database-pattern ] ]
Lists defined configuration settings. These settings can be
- \dRp[+] [ APP-PSQL-patterns">pattern ]
+ \dRp[+] [ app-psql-patterns">pattern ]
Lists replication publications.
- \dRs[+] [ APP-PSQL-patterns">pattern ]
+ \dRs[+] [ app-psql-patterns">pattern ]
Lists replication subscriptions.
- \dT[S+] [ APP-PSQL-patterns">pattern ]
+ \dT[S+] [ app-psql-patterns">pattern ]
Lists data types.
- \du[S+] [ APP-PSQL-patterns">pattern ]
+ \du[S+] [ app-psql-patterns">pattern ]
Lists database roles.
- \dx[+] [ APP-PSQL-patterns">pattern ]
+ \dx[+] [ app-psql-patterns">pattern ]
Lists installed extensions.
- \dy[+] [ APP-PSQL-patterns">pattern ]
+ \dy[+] [ app-psql-patterns">pattern ]
Lists event triggers.
Sends the current query buffer to the server and stores the
query's output into
psql variables (see
- linkend="APP-PSQL-variables" endterm="APP-PSQL -variables-title">).
+ linkend="app-psql-variables" endterm="app-psql -variables-title">).
The query to be executed must return exactly one row. Each column of
the row is stored into a separate variable, named the same as the
column. For example:
- \l[+] or \list[+] [ APP-PSQL-patterns">pattern ]
+ \l[+] or \list[+] [ app-psql-patterns">pattern ]
List the databases in the server and show their names, owners,
Illustrations of how these different formats look can be seen in
- the APP-PSQL-examples"
- endterm="APP-PSQL -examples-title"> section.
+ the app-psql-examples"
+ endterm="app-psql -examples-title"> section.
Valid variable names can contain letters, digits, and
underscores. See the section
- linkend="APP-PSQL -variables"
- endterm="APP-PSQL -variables-title"> below for details.
+ linkend="app-psql -variables"
+ endterm="app-psql -variables-title"> below for details.
Variable names are case-sensitive.
Certain variables are special, in that they
control
psql 's behavior or are
automatically set to reflect connection state. These variables are
- documented in APP-PSQL-variables"
- endterm="APP-PSQL -variables-title">, below.
+ documented in app-psql-variables"
+ endterm="app-psql -variables-title">, below.
This command is unrelated to the
SQL
- command SQL-SET">.
+ command sql-set">.
Most variables that control
psql 's behavior
cannot be unset; instead, an \unset command is interpreted
as setting them to their default values.
- See APP-PSQL-variables"
- endterm="APP-PSQL -variables-title">, below.
+ See app-psql-variables"
+ endterm="app-psql -variables-title">, below.
- \z [ APP-PSQL-patterns">pattern ]
+ \z [ app-psql-patterns">pattern ]
Lists tables, views and sequences with their
- APP-PSQL-patterns">
-
APP-PSQL-patterns-title">Patterns
+ app-psql-patterns">
+
app-psql-patterns-title">Patterns
Advanced Features
- APP-PSQL-variables">
-
APP-PSQL-variables-title">Variables
+ app-psql-variables">
+
app-psql-variables-title">Variables
psql provides variable substitution
bar
This works in both regular SQL commands and meta-commands; there is
- more detail in APP-PSQL-interpolation"
- endterm="APP-PSQL -interpolation-title">, below.
+ more detail in app-psql-interpolation"
+ endterm="app-psql -interpolation-title">, below.
These specify what the prompts
psql
issues should look like. See
- linkend="APP-PSQL -prompting"
- endterm="APP-PSQL -prompting-title"> below.
+ linkend="app-psql -prompting"
+ endterm="app-psql -prompting-title"> below.
- APP-PSQL-interpolation">
-
APP-PSQL-interpolation-title">SQL Interpolation
+ app-psql-interpolation">
+
app-psql-interpolation-title">SQL Interpolation
- APP-PSQL-prompting">
-
APP-PSQL-prompting-title">Prompting
+ app-psql-prompting">
+
app-psql-prompting-title">Prompting
The prompts
psql issues can be customized
The value of the
psql variable
name . See the
- section APP-PSQL-variables"
- endterm="APP-PSQL -variables-title"> for details.
+ section app-psql-variables"
+ endterm="app-psql -variables-title"> for details.
- APP-PSQL-examples">
-
APP-PSQL-examples-title">Examples
+ app-psql-examples">
+
app-psql-examples-title">Examples
The first example shows how to spread a command over several lines of
PostgreSQL documentation
-->
-SQL-REASSIGN-OWNED">
+sql-reassign-owned">
PostgreSQL documentation
-->
-SQL-REFRESHMATERIALIZEDVIEW">
+sql-refreshmaterializedview">
REFRESH MATERIALIZED VIEW
While the default index for future
- SQL-CLUSTER">
+ sql-cluster">
operations is retained, REFRESH MATERIALIZED VIEW does not
order the generated rows based on this property. If you want the data
to be ordered upon generation, you must use an ORDER BY
PostgreSQL documentation
-->
-SQL-REINDEX">
+sql-reindex">
PostgreSQL documentation
-->
-APP-REINDEXDB">
+app-reindexdb">
reindexdb is a wrapper around the SQL
- command SQL-REINDEX">.
+ command sql-reindex">.
There is no effective difference between reindexing databases via
this utility and via other methods for accessing the server.
Diagnostics
- In case of difficulty, see SQL-REINDEX">
- and APP-PSQL"> for
+ In case of difficulty, see sql-reindex">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-SQL-RELEASE-SAVEPOINT">
+sql-release-savepoint">
PostgreSQL documentation
-->
-SQL-RESET">
+sql-reset">
See Also
- SQL-SET">
- SQL-SHOW">
+ sql-set">
+ sql-show">
PostgreSQL documentation
-->
-SQL-REVOKE">
+sql-revoke">
- SQL-REVOKE-description">
+ sql-revoke-description">
Description
- SQL-REVOKE-notes">
+ sql-revoke-notes">
Notes
- SQL-REVOKE-examples">
+ sql-revoke-examples">
Examples
- SQL-REVOKE-compatibility">
+ sql-revoke-compatibility">
Compatibility
PostgreSQL documentation
-->
-SQL-ROLLBACK">
+sql-rollback">
Notes
- Use SQL-COMMIT"> to
+ Use sql-commit"> to
successfully terminate a transaction.
PostgreSQL documentation
-->
-SQL-ROLLBACK-PREPARED">
+sql-rollback-prepared">
PostgreSQL documentation
-->
-SQL-ROLLBACK-TO">
+sql-rollback-to">
Notes
- Use SQL-RELEASE-SAVEPOINT"> to destroy a savepoint
+ Use sql-release-savepoint"> to destroy a savepoint
without discarding the effects of commands executed after it was
established.
PostgreSQL documentation
-->
-SQL-SAVEPOINT">
+sql-savepoint">
Notes
- Use SQL-ROLLBACK-TO"> to
- rollback to a savepoint. Use SQL-RELEASE-SAVEPOINT">
+ Use sql-rollback-to"> to
+ rollback to a savepoint. Use sql-release-savepoint">
to destroy a savepoint, keeping
the effects of commands executed after it was established.
PostgreSQL documentation
-->
-SQL-SECURITY-LABEL">
+sql-security-label">
PostgreSQL documentation
-->
-SQL-SELECT">
+sql-select">
Parameters
- SQL-WITH">
+ sql-with">
WITH Clause
- SQL-FROM">
+ sql-from">
FROM Clause
- SQL-WHERE">
+ sql-where">
WHERE Clause
- SQL-GROUPBY">
+ sql-groupby">
GROUP BY Clause
- SQL-HAVING">
+ sql-having">
HAVING Clause
- SQL-WINDOW">
+ sql-window">
WINDOW Clause
- SQL-UNION">
+ sql-union">
UNION Clause
- SQL-INTERSECT">
+ sql-intersect">
INTERSECT Clause
- SQL-EXCEPT">
+ sql-except">
EXCEPT Clause
- SQL-ORDERBY">
+ sql-orderby">
ORDER BY Clause
- SQL-LIMIT">
+ sql-limit">
LIMIT Clause
- SQL-FOR-UPDATE-SHARE">
+ sql-for-update-share">
The Locking Clause
- SQL-TABLE">
+ sql-table">
TABLE Command
PostgreSQL documentation
-->
-SQL-SELECTINTO">
+sql-selectinto">
PostgreSQL documentation
-->
-SQL-SET">
+sql-set">
See Also
- SQL-RESET">
- SQL-SHOW">
+ sql-reset">
+ sql-show">
-SQL-SET-CONSTRAINTS">
+sql-set-constraints">
PostgreSQL documentation
-->
-SQL-SET-ROLE">
+sql-set-role">
The SESSION and LOCAL modifiers act the same
- as for the regular SQL-SET">
+ as for the regular sql-set">
command.
-SQL-SET-SESSION-AUTHORIZATION">
+sql-set-session-authorization">
SET SESSION AUTHORIZATION
The SESSION and LOCAL modifiers act the same
- as for the regular SQL-SET">
+ as for the regular sql-set">
command.
-SQL-SET-TRANSACTION">
+sql-set-transaction">
- R1-SQL-SET-TRANSACTION-3">
+ r1-sql-set-transaction-3">
Compatibility
PostgreSQL documentation
-->
-SQL-SHOW">
+sql-show">
The name of a run-time parameter. Available parameters are
documented in
and on the
- linkend="SQL-SET "> reference page. In
+ linkend="sql-set "> reference page. In
addition, there are a few parameters that can be shown but not
set:
See Also
- SQL-SET">
- SQL-RESET">
+ sql-set">
+ sql-reset">
PostgreSQL documentation
-->
-SQL-START-TRANSACTION">
+sql-start-transaction">
PostgreSQL documentation
-->
-SQL-TRUNCATE">
+sql-truncate">
PostgreSQL documentation
-->
-SQL-UNLISTEN">
+sql-unlisten">
PostgreSQL documentation
-->
-SQL-UPDATE">
+sql-update">
PostgreSQL documentation
-->
-SQL-VACUUM">
+sql-vacuum">
PostgreSQL documentation
-->
-APP-VACUUMDB">
+app-vacuumdb">
vacuumdb is a wrapper around the SQL
- command SQL-VACUUM">.
+ command sql-vacuum">.
There is no effective difference between vacuuming and analyzing
databases via this utility and via other methods for accessing the
server.
Diagnostics
- In case of difficulty, see SQL-VACUUM">
- and APP-PSQL"> for
+ In case of difficulty, see sql-vacuum">
+ and app-psql"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
PostgreSQL documentation
-->
-SQL-VALUES">
+sql-values">
- A new SQL-CREATEINDEX">CREATE
+ A new sql-createindex">CREATE
INDEX option enables auto-summarization of the
previous
BRIN page range when a new page
range is created.
New commands are
- linkend="SQL-CREATESTATISTICS ">CREATE STATISTICS ,
- SQL-ALTERSTATISTICS">ALTER STATISTICS , and
- SQL-DROPSTATISTICS">DROP STATISTICS .
+ linkend="sql-createstatistics ">CREATE STATISTICS ,
+ sql-alterstatistics">ALTER STATISTICS , and
+ sql-dropstatistics">DROP STATISTICS .
This feature is helpful in estimating query memory usage and when
combining the statistics from individual columns.
-->
Allow explicit control
- over SQL-EXPLAIN">EXPLAIN 's display
+ over sql-explain">EXPLAIN 's display
of planning and execution time (Ashutosh Bapat)
-->
Properly update the statistics collector during
- linkend="SQL-REFRESHMATERIALIZEDVIEW ">REFRESH MATERIALIZED
+ linkend="sql-refreshmaterializedview ">REFRESH MATERIALIZED
VIEW (Jim Mlodgenski)
2016-12-07 [f0e44751d] Implement table partitioning.
-->
- Add table SQL-CREATETABLE-PARTITION">partitioning
+ Add table sql-createtable-partition">partitioning
syntax that automatically creates partition constraints and
handles routing of tuple insertions and updates (Amit Langote)
2017-03-31 [597027163] Add transition table support to plpgsql.
-->
- Add SQL-CREATETRIGGER">AFTER trigger
+ Add sql-createtrigger">AFTER trigger
transition tables to record changed rows (Kevin Grittner, Thomas
Munro)
2016-12-05 [093129c9d] Add support for restrictive RLS policies
-->
- Allow SQL-CREATEPOLICY">restrictive row-level
+ Allow sql-createpolicy">restrictive row-level
security policies (Stephen Frost)
2017-03-28 [ab89e465c] Altering default privileges on schemas
-->
- Allow SQL-ALTERDEFAULTPRIVILEGES">default
+ Allow sql-alterdefaultprivileges">default
permissions on schemas (Matheus Oliveira)
2017-02-10 [2ea5b06c7] Add CREATE SEQUENCE AS clause
-->
- Add SQL-CREATESEQUENCE">CREATE SEQUENCE
+ Add sql-createsequence">CREATE SEQUENCE
AS command to create a sequence matching an integer data type
(Peter Eisentraut)
- For example, allow SQL-DROPFUNCTION">DROP
+ For example, allow sql-dropfunction">DROP
FUNCTION on a function name without arguments if there
is only one function with that name. This behavior is required by the
-->
Support IF NOT EXISTS
- in SQL-CREATESERVER">CREATE SERVER ,
- SQL-CREATEUSERMAPPING">CREATE USER MAPPING ,
- and SQL-CREATECOLLATION">CREATE COLLATION
+ in sql-createserver">CREATE SERVER ,
+ sql-createusermapping">CREATE USER MAPPING ,
+ and sql-createcollation">CREATE COLLATION
(Anastasia Lubennikova, Peter Eisentraut)
2017-03-03 [9eb344faf] Allow vacuums to report oldestxmin
-->
- Make SQL-VACUUM">VACUUM VERBOSE report
+ Make sql-vacuum">VACUUM VERBOSE report
the number of skipped frozen pages and oldest xmin (Masahiko
Sawada, Simon Riggs)
2017-04-06 [321732705] Identity columns
-->
- Add SQL-CREATETABLE">identity columns for
+ Add sql-createtable">identity columns for
assigning a numeric value to columns on insert (Peter Eisentraut)
- This uses the syntax SQL-ALTERTYPE">ALTER
+ This uses the syntax sql-altertype">ALTER
TYPE ... RENAME VALUE.
Client Applications
-
APP-PSQL">
+
app-psql">
2016-10-19 [5d58c07a4] initdb pg_basebackup: Rename -\-noxxx options to -\-no-x
-->
- Rename
APP-INITDB">
initdb
+ Rename
app-initdb">
initdb
options --noclean and --nosync to be spelled
--no-clean and --no-sync (Vik Fearing,
Peter Eisentraut)
-
APP-PG-DUMPALL">
pg_dumpall ,
-
APP-PGRESTORE">
pg_restore
+
app-pg-dumpall">
pg_dumpall ,
+
app-pgrestore">
pg_restore
- Make SQL-SET-CONSTRAINTS">SET
+ Make sql-set-constraints">SET
CONSTRAINT affect only one constraint (Kris Jurka)
Add
FILLFACTOR to
- linkend="
SQL-CREATETABLE ">table and
- linkend="SQL-CREATEINDEX ">index creation (ITAGAKI
+ linkend="
sql-createtable ">table and
+ linkend="sql-createindex ">index creation (ITAGAKI
Takahiro)
Avoid extra scan of tables without indexes during
- linkend="SQL-VACUUM ">VACUUM (Greg Stark)
+ linkend="sql-vacuum ">VACUUM (Greg Stark)
- Improve multicolumn
GiST">
GiST
+ Improve multicolumn
gist">
GiST
indexing (Oleg, Teodor)
now clusterable (Teodor)
- Add
SQL-INSERT">
INSERT /
- linkend="
SQL-UPDATE ">
UPDATE /
- linkend="SQL-DELETE ">DELETE
+ Add
sql-insert">
INSERT /
+ linkend="
sql-update ">
UPDATE /
+ linkend="sql-delete ">DELETE
RETURNING (Jonah Harris, Tom)
- Allow SQL-UPDATE">UPDATE
- and SQL-DELETE">DELETE
+ Allow sql-update">UPDATE
+ and sql-delete">DELETE
to use an alias for the target table (Atsushi Ogawa)
- Allow SQL-UPDATE">UPDATE
+ Allow sql-update">UPDATE
to set multiple columns with a list of values (Susanne
Ebrecht)
- Add SQL-TRUNCATE">CASCADE
+ Add sql-truncate">CASCADE
option to TRUNCATE (Joachim Wieland)
Support FOR UPDATE and FOR SHARE
- in the same SQL-INSERT">SELECT
+ in the same sql-insert">SELECT
command (Tom)
Support portal parameters in
- linkend="
SQL-EXPLAIN ">
EXPLAIN and
- linkend="SQL-EXECUTE ">EXECUTE (Tom)
+ linkend="
sql-explain ">
EXPLAIN and
+ linkend="sql-execute ">EXECUTE (Tom)
If
SQL -level
- linkend="SQL-PREPARE ">PREPARE parameters
+ linkend="sql-prepare ">PREPARE parameters
are unspecified, infer their types from the content of the
query (Neil)
Add
TABLESPACE clause to
- linkend="SQL-CREATETABLEAS ">CREATE TABLE AS
+ linkend="sql-createtableas ">CREATE TABLE AS
(Neil)
Add
ON COMMIT clause to
- linkend="SQL-CREATETABLEAS ">CREATE TABLE AS
+ linkend="sql-createtableas ">CREATE TABLE AS
(Neil)
Add
INCLUDING CONSTRAINTS to
- linkend="SQL-CREATETABLE ">CREATE TABLE LIKE
+ linkend="sql-createtable ">CREATE TABLE LIKE
(Greg Stark)
Allow the creation of placeholder (shell)
- linkend="SQL-CREATETYPE ">types (Martijn van Oosterhout)
+ linkend="sql-createtype ">types (Martijn van Oosterhout)
- SQL-CREATEAGGREGATE">Aggregate functions
+ sql-createaggregate">Aggregate functions
now support multiple input parameters (Sergey Koposov, Tom)
Add new aggregate creation
- linkend="SQL-CREATEAGGREGATE ">syntax (Tom)
+ linkend="sql-createaggregate ">syntax (Tom)
Add
- linkend="SQL-ALTERROLE ">ALTER ROLE PASSWORD NULL
+ linkend="sql-alterrole ">ALTER ROLE PASSWORD NULL
to remove a previously set role password (Peter)
- Add SQL-DROP-OWNED">DROP OWNED
+ Add sql-drop-owned">DROP OWNED
to drop all objects owned by a role (Alvaro)
- Add SQL-REASSIGN-OWNED">REASSIGN
+ Add sql-reassign-owned">REASSIGN
OWNED to reassign ownership of all objects owned
by a role (Alvaro)
- Add SQL-GRANT">GRANT ON SEQUENCE
+ Add sql-grant">GRANT ON SEQUENCE
syntax (Bruce)
- Add SQL-GRANT">USAGE
+ Add sql-grant">USAGE
permission for sequences that allows only currval()
and nextval() , not setval()
(Bruce)
- Add SQL-ALTERTABLE">ALTER TABLE
+ Add sql-altertable">ALTER TABLE
[ NO ] INHERIT (Greg Stark)
- Allow SQL-COMMENT">comments on global
+ Allow sql-comment">comments on global
objects to be stored globally (Kris Jurka)
- The new syntax is SQL-CREATEINDEX">CREATE
+ The new syntax is sql-createindex">CREATE
INDEX CONCURRENTLY. The default behavior is
still to block table modification while an index is being
created.
- Allow SQL-COPY">COPY to
+ Allow sql-copy">COPY to
dump a SELECT query (Zoltan Boszormenyi, Karel
Zak)
- Make the SQL-COPY">COPY
+ Make the sql-copy">COPY
command return a command tag that includes the number of
rows copied (Volkan YAZICI)
- Allow SQL-VACUUM">VACUUM
+ Allow sql-vacuum">VACUUM
to expire rows without being affected by other concurrent
VACUUM operations (Hannu Krossing, Alvaro, Tom)
- Make
APP-INITDB">
initdb
+ Make
app-initdb">
initdb
detect the operating system locale and set the default
DateStyle accordingly (Peter)
- Allow SQL-CREATEDOMAIN">domains to be
+ Allow sql-createdomain">domains to be
based on other domains (Tom)
The fix is to dump a SERIAL column by explicitly
specifying its DEFAULT and sequence elements,
and reconstructing the SERIAL column on reload
- using a new SQL-ALTERSEQUENCE">ALTER
+ using a new sql-altersequence">ALTER
SEQUENCE OWNED BY command. This also allows
dropping a SERIAL column specification.
-
APP-PGDUMP">pg_dump Changes
+
app-pgdump">pg_dump Changes
- Add
APP-PGRESTORE">
pg_restore
+ Add
app-pgrestore">
pg_restore
--no-data-for-failed-tables option to suppress
loading data if table creation failed (i.e., the table already
exists) (Martin Pitt)
- Add
APP-PGRESTORE">
pg_restore
+ Add
app-pgrestore">
pg_restore
option to run the entire session in a single transaction
(Simon)
This allows passwords to be sent pre-encrypted for commands
- like SQL-ALTERROLE">ALTER ROLE ...
+ like sql-alterrole">ALTER ROLE ...
PASSWORD.
- Allow SQL-SHOW">SHOW to
+ Allow sql-show">SHOW to
put its result into a variable (Joachim Wieland)
- Add SQL-COPY">COPY TO STDOUT
+ Add sql-copy">COPY TO STDOUT
(Joachim Wieland)
Add
MSVC support for utility commands and
- linkend="
APP-PGDUMP ">
pg_dump (Hiroshi
+ linkend="
app-pgdump ">
pg_dump (Hiroshi
Saito)
- Add
GIN">
GIN (Generalized
+ Add
gin">
GIN (Generalized
Inverted iNdex) index access method (Teodor, Oleg)
Rtree has been re-implemented using
- linkend="
GiST ">
GiST . Among other
+ linkend="
gist ">
GiST . Among other
differences, this means that rtree indexes now have support
for crash recovery via write-ahead logging (WAL).
Easier database object permissions management.
- linkend="SQL-GRANT ">GRANT /REVOKE IN
+ linkend="sql-grant ">GRANT /REVOKE IN
SCHEMA supports mass permissions changes on existing objects,
- while SQL-ALTERDEFAULTPRIVILEGES">ALTER DEFAULT
+ while sql-alterdefaultprivileges">ALTER DEFAULT
PRIVILEGES allows control of privileges for objects created in
the future. Large objects (BLOBs) now support permissions management as
well.
Broadly enhanced stored procedure support.
- The SQL-DO">DO statement supports
+ The sql-do">DO statement supports
ad-hoc or anonymous
code blocks.
Functions can now be called using named parameters.
PL/pgSQL is now installed by default, and
New trigger features, including
SQL-standard-compliant
- linkend="SQL-CREATETRIGGER ">per-column triggers and
+ linkend="sql-createtrigger ">per-column triggers and
conditional trigger execution.
- SQL-CREATETABLE-compatibility">Deferrable
+ sql-createtable-compatibility">Deferrable
unique constraints. Mass updates to unique keys are now possible
without trickery.
New high-performance implementation of the
-
SQL-LISTEN">
LISTEN /
- linkend="SQL-NOTIFY ">NOTIFY feature.
+
sql-listen">
LISTEN /
+ linkend="sql-notify ">NOTIFY feature.
Pending events are now stored in a memory-based queue rather than
a table. Also, a payload
string can be sent with each
event, rather than transmitting just an event name as before.
New implementation of
- SQL-VACUUM">VACUUM FULL .
+ sql-vacuum">VACUUM FULL .
This command now rewrites the entire table and indexes, rather than
moving individual rows to compact space. It is substantially faster
in most cases, and no longer results in index bloat.
Allow per-tablespace values to be set for sequential and random page
cost estimates (seq_page_cost /random_page_cost )
- via SQL-ALTERTABLESPACE">ALTER TABLESPACE
+ via sql-altertablespace">ALTER TABLESPACE
... SET/RESET (Robert Haas)
Improve performance of
- linkend="SQL-TRUNCATE ">TRUNCATE when
+ linkend="sql-truncate ">TRUNCATE when
the table was created or truncated earlier in the same transaction
(Tom Lane)
- Improve SQL-ANALYZE">ANALYZE
+ Improve sql-analyze">ANALYZE
to support inheritance-tree statistics (Tom Lane)
Allow setting of number-of-distinct-values statistics using
- linkend="SQL-ALTERTABLE ">ALTER TABLE
+ linkend="sql-altertable ">ALTER TABLE
(Robert Haas)
- Perform SQL-FOR-UPDATE-SHARE">SELECT
+ Perform sql-for-update-share">SELECT
FOR UPDATE/SHARE processing after
applying LIMIT , so the number of rows returned
is always predictable (Tom Lane)
Allow mixing of traditional and SQL-standard
- linkend="SQL-LIMIT ">LIMIT /OFFSET
+ linkend="sql-limit ">LIMIT /OFFSET
syntax (Tom Lane)
Extend the supported frame options in
- linkend="SQL-WINDOW ">window functions (Hitoshi
+ linkend="sql-window ">window functions (Hitoshi
Harada)
- Speed up SQL-CREATEDATABASE">CREATE
+ Speed up sql-createdatabase">CREATE
DATABASE by deferring flushes to disk (Andres
Freund, Greg Stark)
- Allow SQL-COMMENT">comments on
+ Allow sql-comment">comments on
columns of tables, views, and composite types only, not other
relation types such as indexes and
TOAST tables (Tom Lane)
Allow the creation of
- linkend="SQL-CREATETYPE -enum">enumerated types containing
+ linkend="sql-createtype -enum">enumerated types containing
no values (Bruce Momjian)
-
SQL-CREATETABLE">CREATE TABLE
+
sql-createtable">CREATE TABLE
- Add SQL-CREATETABLE-compatibility">deferrable
+ Add sql-createtable-compatibility">deferrable
unique constraints (Dean Rasheed)
Exclusion constraints generalize uniqueness constraints by allowing
arbitrary comparison operators, not just equality. They are created
- with the SQL-CREATETABLE-EXCLUDE">CREATE
+ with the sql-createtable-exclude">CREATE
TABLE CONSTRAINT ... EXCLUDE clause.
The most common use of exclusion constraints is to specify that column
entries must not overlap, rather than simply not be equal. This is
Add the ability to make mass permission changes across a whole
schema using the new
- linkend="SQL-GRANT ">GRANT /REVOKE
+ linkend="sql-grant ">GRANT /REVOKE
IN SCHEMA clause (Petr Jelinek)
- Add SQL-ALTERDEFAULTPRIVILEGES">ALTER
+ Add sql-alterdefaultprivileges">ALTER
DEFAULT PRIVILEGES command to control privileges
of objects created later (Petr Jelinek)
- Make
SQL-LISTEN">
LISTEN /
- linkend="SQL-NOTIFY ">NOTIFY store pending events
+ Make
sql-listen">
LISTEN /
+ linkend="sql-notify ">NOTIFY store pending events
in a memory queue, rather than in a system table (Joachim
Wieland)
- Allow SQL-NOTIFY">NOTIFY
+ Allow sql-notify">NOTIFY
to pass an optional payload
string to listeners
(Joachim Wieland)
- Allow SQL-CLUSTER">CLUSTER
+ Allow sql-cluster">CLUSTER
on all per-database system catalogs (Tom Lane)
-
SQL-COPY">COPY
+
sql-copy">COPY
-
SQL-EXPLAIN">EXPLAIN
+
sql-explain">EXPLAIN
-
SQL-VACUUM">VACUUM
+
sql-vacuum">VACUUM
Allow an index to be named automatically by omitting the index name in
- SQL-CREATEINDEX">CREATE INDEX
+ sql-createindex">CREATE INDEX
(Tom Lane)
Support execution of anonymous code blocks using the
- linkend="SQL-DO ">DO statement
+ linkend="sql-do ">DO statement
(Petr Jelinek, Joshua Tolley, Hannu Valtonen)
Implement SQL-standard-compliant
- linkend="SQL-CREATETRIGGER ">per-column triggers
+ linkend="sql-createtrigger ">per-column triggers
(Itagaki Takahiro)
Add the
WHEN clause to
- linkend="SQL-CREATETRIGGER ">CREATE TRIGGER
+ linkend="sql-createtrigger ">CREATE TRIGGER
to allow control over whether a trigger is fired (Itagaki
Takahiro)
Add the
OR REPLACE clause to
- linkend="SQL-CREATELANGUAGE ">CREATE LANGUAGE
+ linkend="sql-createlanguage ">CREATE LANGUAGE
(Tom Lane)
Add an
--analyze-only option to
- linkend="APP-VACUUMDB ">vacuumdb , to analyze without
+ linkend="app-vacuumdb ">vacuumdb , to analyze without
vacuuming (Bruce Momjian)
Add support for quoting/escaping the values of
psql
- APP-PSQL-variables">variables as SQL strings or
+ app-psql-variables">variables as SQL strings or
identifiers (Pavel Stehule, Robert Haas)
Fix
psql --file - to properly honor
- linkend="R1-APP-PSQL -3">--single-transaction
+ linkend="r1-app-psql -3">--single-transaction
(Bruce Momjian)
psql
- linkend="APP-PSQL -meta-commands">\d
+ linkend="app-psql -meta-commands">\d
Commands
Add
- linkend="CONTRIB-DBLINK-GET-NOTIFY ">dblink_get_notify()
+ linkend="contrib-dblink-get-notify ">dblink_get_notify()
to contrib/dblink (Marcus Kempe)
This affects
- linkend="CONTRIB-DBLINK-BUILD-SQL-INSERT ">dblink_build_sql_insert()
+ linkend="contrib-dblink-build-sql-insert ">dblink_build_sql_insert()
and related functions. These functions now number columns according
to logical not physical column numbers.
- Add support for SQL-CREATEFOREIGNTABLE">foreign
+ Add support for sql-createforeigntable">foreign
tables
Support unlogged tables using the UNLOGGED
- option in SQL-CREATETABLE">CREATE
+ option in sql-createtable">CREATE
TABLE
Add nearest-neighbor (order-by-operator) searching to
- linkend="
GiST ">
GiST indexes
+ linkend="
gist ">
GiST indexes
- Add a SQL-SECURITY-LABEL">SECURITY
+ Add a sql-security-label">SECURITY
LABEL command and support for
SELinux permissions control
All contrib modules are now installed with
- linkend="SQL-CREATEEXTENSION ">CREATE EXTENSION
+ linkend="sql-createextension ">CREATE EXTENSION
rather than by manually invoking their SQL scripts
(Dimitri Fontaine, Tom Lane)
Support unlogged tables using the UNLOGGED
- option in SQL-CREATETABLE">CREATE
+ option in sql-createtable">CREATE
TABLE (Robert Haas)
- Add a SQL-CREATEROLE">replication permission
+ Add a sql-createrole">replication permission
for roles (Magnus Hagander)
Extensions are controlled by the new
- linkend="
SQL-CREATEEXTENSION ">
CREATE /
- linkend="
SQL-ALTEREXTENSION ">
ALTER /
- linkend="SQL-DROPEXTENSION ">DROP EXTENSION
+ linkend="
sql-createextension ">
CREATE /
+ linkend="
sql-alterextension ">
ALTER /
+ linkend="sql-dropextension ">DROP EXTENSION
commands. This replaces ad-hoc methods of grouping objects that
are added to a
PostgreSQL installation.
- Add support for SQL-CREATEFOREIGNTABLE">foreign
+ Add support for sql-createforeigntable">foreign
tables (Shigeru Hanada, Robert Haas, Jan Urbanski,
Heikki Linnakangas)
Allow new values to be added to an existing enum type via
- SQL-ALTERTYPE">ALTER TYPE (Andrew
+ sql-altertype">ALTER TYPE (Andrew
Dunstan)
- Add SQL-ALTERTYPE">ALTER TYPE ...
+ Add sql-altertype">ALTER TYPE ...
ADD/DROP/ALTER/RENAME ATTRIBUTE (Peter Eisentraut)
Add
RESTRICT /
CASCADE to
- linkend="SQL-ALTERTYPE ">ALTER TYPE operations
+ linkend="sql-altertype ">ALTER TYPE operations
on typed tables (Peter Eisentraut)
-
SQL-CREATETABLE">CREATE/ALTER TABLE
+
sql-createtable">CREATE/ALTER TABLE
- Allow SQL-ALTERTABLE">ALTER TABLE
+ Allow sql-altertable">ALTER TABLE
... SET DATA TYPE to avoid table rewrites in
appropriate cases (Noah Misch, Robert Haas)
- Add SQL-CREATETABLE">CREATE TABLE IF
+ Add sql-createtable">CREATE TABLE IF
NOT EXISTS syntax (Robert Haas)
- Add a SQL-SECURITY-LABEL">SECURITY
+ Add a sql-security-label">SECURITY
LABEL command (KaiGai Kohei)
- Make SQL-TRUNCATE">TRUNCATE ... RESTART
+ Make sql-truncate">TRUNCATE ... RESTART
IDENTITY restart sequences transactionally (Steve
Singer)
-
SQL-COPY">COPY
+
sql-copy">COPY
Add
ENCODING option to
- linkend="SQL-COPY ">COPY TO/FROM (Hitoshi
+ linkend="sql-copy ">COPY TO/FROM (Hitoshi
Harada, Itagaki Takahiro)
- Add bidirectional SQL-COPY">COPY
+ Add bidirectional sql-copy">COPY
protocol support (Fujii Masao)
-
SQL-EXPLAIN">EXPLAIN
+
sql-explain">EXPLAIN
-
SQL-VACUUM">VACUUM
+
sql-vacuum">VACUUM
Add additional details to the output of
- linkend="SQL-VACUUM ">VACUUM FULL VERBOSE
- and SQL-CLUSTER">CLUSTER VERBOSE
+ linkend="sql-vacuum ">VACUUM FULL VERBOSE
+ and sql-cluster">CLUSTER VERBOSE
(Itagaki Takahiro)
-
SQL-CLUSTER">CLUSTER
+
sql-cluster">CLUSTER
Add nearest-neighbor (order-by-operator) searching to
- linkend="
GiST ">
GiST indexes (Teodor Sigaev, Tom Lane)
+ linkend="
gist ">
GiST indexes (Teodor Sigaev, Tom Lane)
- Allow
GIN">
GIN indexes to index null
+ Allow
gin">
GIN indexes to index null
and empty values (Tom Lane)
- Allow
GIN">
GIN indexes to
+ Allow
gin">
GIN indexes to
better recognize duplicate search entries (Tom Lane)
- Fix
GiST">
GiST indexes to be fully
+ Fix
gist">
GiST indexes to be fully
crash-safe (Heikki Linnakangas)
- Support SQL-CREATETRIGGER">INSTEAD
+ Support sql-createtrigger">INSTEAD
OF triggers on views (Dean Rasheed)
- Add
APP-PGDUMP">
pg_dump
+ Add
app-pgdump">
pg_dump
and
- linkend="
APP-PG-DUMPALL ">
pg_dumpall
+ linkend="
app-pg-dumpall ">
pg_dumpall
option --quote-all-identifiers to force quoting
of all identifiers (Robert Haas)
This uses the new
- linkend="SQL-SECURITY-LABEL ">SECURITY LABEL
+ linkend="sql-security-label ">SECURITY LABEL
facility.
Merge documentation for
CREATE CONSTRAINT TRIGGER and
- linkend="SQL-CREATETRIGGER ">CREATE TRIGGER
+ linkend="sql-createtrigger ">CREATE TRIGGER
(Alvaro Herrera)
- Add the SPGiST">SP-GiST (Space-Partitioned
+ Add the spgist">SP-GiST (Space-Partitioned
GiST) index access method
Add a
- linkend="SQL-CREATEVIEW ">security_barrier
+ linkend="sql-createview ">security_barrier
option for views
- Prevent SQL-ALTERDOMAIN">ALTER
+ Prevent sql-alterdomain">ALTER
DOMAIN from working on non-domain types (Peter
Eisentraut)
No longer forcibly lowercase procedural language names in
- linkend="SQL-CREATEFUNCTION ">CREATE FUNCTION
+ linkend="sql-createfunction ">CREATE FUNCTION
(Robert Haas)
Provide consistent backquote, variable
expansion, and quoted substring behavior in
- linkend="
APP-PSQL ">
psql meta-command
+ linkend="
app-psql ">
psql meta-command
arguments (Tom Lane)
No longer treat
- linkend="
APP-CLUSTERDB ">
clusterdb
+ linkend="
app-clusterdb ">
clusterdb
table names as double-quoted; no longer treat
- linkend="
APP-REINDEXDB ">
reindexdb table
+ linkend="
app-reindexdb ">
reindexdb table
and index names as double-quoted (Bruce Momjian)
-
APP-CREATEUSER">
createuser
+
app-createuser">
createuser
no longer prompts for option settings by default (Peter Eisentraut)
Disable prompting for the user name in
- linkend="
APP-DROPUSER ">
dropuser unless
+ linkend="
app-dropuser ">
dropuser unless
--interactive is specified (Peter Eisentraut)
- Add the SPGiST">SP-GiST (Space-Partitioned
+ Add the spgist">SP-GiST (Space-Partitioned
GiST) index access method (Teodor Sigaev, Oleg Bartunov, Tom
Lane)
Add
CONCURRENTLY option to
- linkend="SQL-DROPINDEX ">DROP INDEX
+ linkend="sql-dropindex ">DROP INDEX
(Simon Riggs)
- Add the ability to SQL-ALTERTABLE">rename
+ Add the ability to sql-altertable">rename
constraints (Peter Eisentraut)
Reduce need to rebuild tables and indexes for certain
- linkend="SQL-ALTERTABLE ">ALTER TABLE
+ linkend="sql-altertable ">ALTER TABLE
... ALTER COLUMN TYPE operations (Noah Misch)
- Avoid having SQL-ALTERTABLE">ALTER
+ Avoid having sql-altertable">ALTER
TABLE revalidate foreign key constraints in some
cases where it is not necessary (Noah Misch)
- Add SQL-ALTERFOREIGNDATAWRAPPER">ALTER
+ Add sql-alterforeigndatawrapper">ALTER
FOREIGN DATA WRAPPER ... RENAME
- and SQL-ALTERSERVER">ALTER
+ and sql-alterserver">ALTER
SERVER ... RENAME (Peter Eisentraut)
- Add SQL-ALTERDOMAIN">ALTER
+ Add sql-alterdomain">ALTER
DOMAIN ... RENAME (Peter Eisentraut)
-
SQL-CREATETABLE">CREATE TABLE
+
sql-createtable">CREATE TABLE
Add a
- linkend="SQL-CREATEVIEW ">security_barrier
+ linkend="sql-createview ">security_barrier
option for views (KaiGai Kohei, Robert Haas)
Add a new
- linkend="SQL-CREATEFUNCTION ">LEAKPROOF function
+ linkend="sql-createfunction ">LEAKPROOF function
attribute to mark functions that can safely be pushed down
into security_barrier views (KaiGai Kohei)
- Allow SQL-VACUUM">VACUUM to more
+ Allow sql-vacuum">VACUUM to more
easily skip pages that cannot be locked (Simon Riggs, Robert Haas)
- Make SQL-EXPLAIN">EXPLAIN
+ Make sql-explain">EXPLAIN
(BUFFERS) count blocks dirtied and written (Robert Haas)
- Allow SQL-CREATEDOMAIN">domains to be
+ Allow sql-createdomain">domains to be
declared NOT VALID (Álvaro Herrera)
database state.
Snapshots are exported via
linkend="functions-snapshot-synchronization">pg_export_snapshot()
- and imported via SQL-SET-TRANSACTION">SET
+ and imported via sql-set-transaction">SET
TRANSACTION SNAPSHOT. Only snapshots from
currently-running transactions can be imported.
options --auth-local and --auth-host
(Peter Eisentraut)
Add --replication /--no-replication flags to
-
APP-CREATEUSER">
createuser
+
app-createuser">
createuser
to control replication permission (Fujii Masao)
Add the
--if-exists option to
- linkend="
APP-DROPDB ">
dropdb and
- linkend="
APP-DROPUSER ">
dropuser (Josh
+ linkend="
app-dropdb ">
dropdb and
+ linkend="
app-dropuser ">
dropuser (Josh
Kupershmidt)
In
psql tab completion, complete
SQL
keywords in either upper or lower case according to the new
- linkend="APP-PSQL -variables">COMP_KEYWORD_CASE
+ linkend="app-psql -variables">COMP_KEYWORD_CASE
setting (Peter Eisentraut)
Make
- linkend="
APP-PG-DUMPALL ">
pg_dumpall dump all
+ linkend="
app-pg-dumpall ">
pg_dumpall dump all
roles first, then all configuration settings on roles (Phil Sorber)
- Add SQL-CREATEMATERIALIZEDVIEW">materialized
+ Add sql-creatematerializedview">materialized
views
Make simple views
- linkend="SQL-CREATEVIEW -updatable-views">auto-updatable
+ linkend="sql-createview -updatable-views">auto-updatable
- Allow SQL-CREATEFOREIGNDATAWRAPPER">foreign data
+ Allow sql-createforeigndatawrapper">foreign data
wrappers to support writes (inserts/updates/deletes) on foreign
tables
A dump/restore using
- linkend="
APP-PG-DUMPALL ">
pg_dumpall , or use
+ linkend="
app-pg-dumpall ">
pg_dumpall , or use
required for those wishing to migrate data from any previous release.
- Change multicolumn SQL-CREATETABLE">ON UPDATE
+ Change multicolumn sql-createtable">ON UPDATE
SET NULL/SET DEFAULT foreign key actions to affect
all columns of the constraint, not just those changed in the
UPDATE (Tom Lane)
- Allow
GiST">
GiST indexes to be
+ Allow
gist">
GiST indexes to be
unlogged (Jeevan Chalke)
- Add SQL-COPY">COPY FREEZE
+ Add sql-copy">COPY FREEZE
option to avoid the overhead of marking tuples as frozen later
(Simon Riggs, Jeff Davis)
Improve performance of the
- linkend="SQL-CREATETABLE ">CREATE TEMPORARY TABLE ... ON
+ linkend="sql-createtable ">CREATE TEMPORARY TABLE ... ON
COMMIT DELETE ROWS option by not truncating such temporary
tables in transactions that haven't touched any temporary tables
(Heikki Linnakangas)
The checksum option can be set during
- linkend="APP-INITDB ">initdb.
+ linkend="app-initdb ">initdb.
Increase the maximum
- linkend="
APP-INITDB ">initdb-configured value for
+ linkend="
app-initdb ">initdb-configured value for
linkend="guc-shared-buffers">shared_buffers
to 128MB (Robert Haas)
Add the last checkpoint's redo location to
- linkend="
APP-PGCONTROLDATA ">
pg_controldata 's
+ linkend="
app-pgcontroldata ">
pg_controldata 's
output (Fujii Masao)
Add support for piping
- linkend="
SQL-COPY ">
COPY and
- linkend="
APP-PSQL ">
psql \copy
+ linkend="
sql-copy ">
COPY and
+ linkend="
app-psql ">
psql \copy
data to/from an external program (Etsuro Fujita)
Allow a multirow
- linkend="SQL-VALUES ">VALUES clause in a rule
+ linkend="sql-values ">VALUES clause in a rule
to reference OLD /NEW (Tom Lane)
- Allow SQL-CREATEFOREIGNDATAWRAPPER">foreign data
+ Allow sql-createforeigndatawrapper">foreign data
wrappers to support writes (inserts/updates/deletes) on foreign
tables (KaiGai Kohei)
- Add SQL-CREATESCHEMA">CREATE SCHEMA ... IF
+ Add sql-createschema">CREATE SCHEMA ... IF
NOT EXISTS clause (Fabrízio de Royes Mello)
- Make SQL-REASSIGN-OWNED">REASSIGN
+ Make sql-reassign-owned">REASSIGN
OWNED also change ownership of shared objects
(Álvaro Herrera)
- Suppress SQL-CREATETABLE">CREATE
+ Suppress sql-createtable">CREATE
TABLE's messages about implicit index and sequence creation
(Robert Haas)
- Allow SQL-DROPTABLE">DROP TABLE IF
+ Allow sql-droptable">DROP TABLE IF
EXISTS to succeed when a non-existent schema is specified
in the table name (Bruce Momjian)
Support
IF NOT EXISTS option in
- linkend="SQL-ALTERTYPE ">ALTER TYPE ... ADD VALUE
+ linkend="sql-altertype ">ALTER TYPE ... ADD VALUE
(Andrew Dunstan)
- Add SQL-ALTERROLE">ALTER ROLE ALL
+ Add sql-alterrole">ALTER ROLE ALL
SET to establish settings for all users (Peter Eisentraut)
This allows settings to apply to all users in all databases.
- linkend="SQL-ALTERDATABASE ">ALTER DATABASE SET
+ linkend="sql-alterdatabase ">ALTER DATABASE SET
already allowed addition of settings for all users in a single
database. postgresql.conf has a similar effect.
- Add support for SQL-ALTERRULE">ALTER RULE
+ Add support for sql-alterrule">ALTER RULE
... RENAME (Ali Dar)
- Add SQL-CREATEMATERIALIZEDVIEW">materialized
+ Add sql-creatematerializedview">materialized
views (Kevin Grittner)
Make simple views
- linkend="SQL-CREATEVIEW -updatable-views">auto-updatable
+ linkend="sql-createview -updatable-views">auto-updatable
(Dean Rasheed)
Simple views that reference some or all columns from a
single base table are now updatable by default. More
complex views can be made updatable using
- linkend="SQL-CREATETRIGGER ">INSTEAD OF triggers
- or SQL-CREATERULE">INSTEAD rules.
+ linkend="sql-createtrigger ">INSTEAD OF triggers
+ or sql-createrule">INSTEAD rules.
- Add SQL-CREATEVIEW">CREATE RECURSIVE
+ Add sql-createview">CREATE RECURSIVE
VIEW syntax (Peter Eisentraut)
- Increase the maximum size of Objects">large
+ Increase the maximum size of objects">large
objects from 2GB to 4TB (Nozomi Anzai, Yugo Nagata)
This reduces line length in view printing, for instance in
- linkend="
APP-PGDUMP ">
pg_dump output.
+ linkend="
app-pgdump ">
pg_dump output.
Allow PL/pgSQL to access the number of rows processed by
- SQL-COPY">COPY (Pavel Stehule)
+ sql-copy">COPY (Pavel Stehule)
Allow
SPI functions to access the number of rows processed
- by SQL-COPY">COPY (Pavel Stehule)
+ by sql-copy">COPY (Pavel Stehule)
Support multiple
--table arguments for
- linkend="
APP-PGRESTORE ">
pg_restore ,
-
APP-CLUSTERDB">
clusterdb ,
-
APP-REINDEXDB">
reindexdb ,
- and
APP-VACUUMDB">
vacuumdb
+ linkend="
app-pgrestore ">
pg_restore ,
+
app-clusterdb">
clusterdb ,
+
app-reindexdb">
reindexdb ,
+ and
app-vacuumdb">
vacuumdb
(Josh Kupershmidt)
This is similar to the way
- linkend="
APP-PGDUMP ">
pg_dump 's
+ linkend="
app-pgdump ">
pg_dump 's
--table option works.
Add
--dbname option to
- linkend="
APP-PG-DUMPALL ">
pg_dumpall ,
+ linkend="
app-pg-dumpall ">
pg_dumpall ,
linkend="app-pgbasebackup">
pg_basebackup , and
linkend="app-pgreceivewal">
pg_receivexlog
-
APP-PSQL-meta-commands">Backslash Commands
+
app-psql-meta-commands">Backslash Commands
Add isolation tests for
- linkend="SQL-CREATEINDEX ">CREATE INDEX
+ linkend="sql-createindex ">CREATE INDEX
CONCURRENTLY (Abhijit Menon-Sen)
- Add new
SQL command
SQL-ALTERSYSTEM">
+ Add new
SQL command
sql-altersystem">
for changing postgresql.conf configuration file entries
- Reduce lock strength for some SQL-ALTERTABLE">
+ Reduce lock strength for some sql-altertable">
commands
- Rename SQL-EXPLAIN">EXPLAIN
+ Rename sql-explain">EXPLAIN
ANALYZE's total runtime
output
to execution time
(Tom Lane)
- SQL-SHOW">SHOW TIME ZONE now
+ sql-show">SHOW TIME ZONE now
outputs simple numeric UTC offsets in
POSIX timezone
format (Tom Lane)
- Make SQL-VACUUM"> properly report dead but
+ Make sql-vacuum"> properly report dead but
not-yet-removable rows to the statistics collector (Hari Babu)
- Reduce
GIN">
GIN index size
+ Reduce
gin">
GIN index size
(Alexander Korotkov, Heikki Linnakangas)
Indexes upgraded via will work fine
but will still be in the old, larger
GIN format.
- Use SQL-REINDEX"> to recreate old GIN indexes in the
+ Use sql-reindex"> to recreate old GIN indexes in the
new format.
Improve speed of multi-key
- linkend="
GIN ">
GIN lookups (Alexander Korotkov,
+ linkend="
gin ">
GIN lookups (Alexander Korotkov,
Heikki Linnakangas)
- Add
GiST">
GiST index support
+ Add
gist">
GiST index support
for inet and
cidr data types
(Emre Hasegeli)
Attempt to freeze
tuples when tables are rewritten with
- linkend="
SQL-CLUSTER "> or
- linkend="SQL-VACUUM ">VACUUM FULL (Robert Haas,
+ linkend="
sql-cluster "> or
+ linkend="sql-vacuum ">VACUUM FULL (Robert Haas,
Andres Freund)
- Improve speed of
SQL-COPY"> with default
+ Improve speed of
sql-copy"> with default
linkend="functions-sequence-table">nextval()
columns (Simon Riggs)
Improve speed of accessing many different
- linkend="SQL-CREATESEQUENCE ">sequences in the same session
+ linkend="sql-createsequence ">sequences in the same session
(David Rowley)
Reduce memory allocated by
PL/pgSQL
- SQL-DO"> blocks (Tom Lane)
+ sql-do"> blocks (Tom Lane)
- Add new
SQL command
SQL-ALTERSYSTEM">
+ Add new
SQL command
sql-altersystem">
for changing postgresql.conf configuration file entries
(Amit Kapila)
Add relation option
- linkend="SQL-CREATETABLE -storage-parameters">user_catalog_table
+ linkend="sql-createtable -storage-parameters">user_catalog_table
to identify user-created tables involved in logical change-set
encoding (Andres Freund)
- Allow SQL-SELECT"> to have
+ Allow sql-select"> to have
an empty target list (Tom Lane)
- Ensure that SQL-SELECT">SELECT ... FOR UPDATE
+ Ensure that sql-select">SELECT ... FOR UPDATE
NOWAIT does not wait in corner cases involving
already-concurrently-updated tuples (Craig Ringer and Thomas Munro)
- Add SQL-DISCARD">DISCARD
+ Add sql-discard">DISCARD
SEQUENCES command to discard cached sequence-related state
(Fabrízio de Royes Mello, Robert Haas)
Add FORCE NULL option
- to SQL-COPY">COPY FROM , which
+ to sql-copy">COPY FROM , which
causes quoted strings matching the specified null string to be
converted to NULLs in CSV mode (Ian Barwick, Michael
Paquier)
-
SQL-EXPLAIN">
+
sql-explain">
This is done with
- linkend="SQL-REFRESHMATERIALIZEDVIEW ">REFRESH MATERIALIZED
+ linkend="sql-refreshmaterializedview ">REFRESH MATERIALIZED
VIEW CONCURRENTLY.
Allow views to be
- linkend="SQL-CREATEVIEW -updatable-views">automatically
+ linkend="sql-createview -updatable-views">automatically
updated even if they contain some non-updatable columns
(Dean Rasheed)
- This is controlled with the new SQL-CREATEVIEW">
+ This is controlled with the new sql-createview">
clause WITH CHECK OPTION .
- Support triggers on SQL-CREATEFOREIGNTABLE">foreign
+ Support triggers on sql-createforeigntable">foreign
tables (Ronan Dunklau)
Allow moving groups of objects from one tablespace to another
using the ALL IN TABLESPACE ... SET TABLESPACE form of
- SQL-ALTERTABLE">, ">, or
- SQL-ALTERMATERIALIZEDVIEW"> (Stephen Frost)
+ sql-altertable">, ">, or
+ sql-altermaterializedview"> (Stephen Frost)
Allow changing foreign key constraint deferrability
- via SQL-ALTERTABLE"> ... ALTER
+ via sql-altertable"> ... ALTER
CONSTRAINT (Simon Riggs)
- Reduce lock strength for some SQL-ALTERTABLE">
+ Reduce lock strength for some sql-altertable">
commands
(Simon Riggs, Noah Misch, Robert Haas)
Allow tablespace options to be set
- in SQL-CREATETABLESPACE"> (Vik Fearing)
+ in sql-createtablespace"> (Vik Fearing)
Formerly these options could only be set
- via SQL-ALTERTABLESPACE">.
+ via sql-altertablespace">.
- Allow SQL-CREATEAGGREGATE"> to define the estimated
+ Allow sql-createaggregate"> to define the estimated
size of the aggregate's transition state data (Hadi Moshayedi)
- Add APP-CREATEUSER"> option -g
+ Add app-createuser"> option -g
to specify role membership (Christopher Browne)
- Add APP-VACUUMDB">
+ Add app-vacuumdb">
option --analyze-in-stages to analyze in stages of
increasing granularity (Peter Eisentraut)
-
APP-PSQL">
+
app-psql">
Suppress
No rows
output in
psql
- linkend="APP-PSQL -meta-commands">expanded
+ linkend="app-psql -meta-commands">expanded
mode when the footer is disabled (Bruce Momjian)
-
APP-PSQL-meta-commands">Backslash Commands
+
app-psql-meta-commands">Backslash Commands
-
APP-PGDUMP">
+
app-pgdump">
- Allow APP-PGRESTORE"> options
+ Allow app-pgrestore"> options
-I , -P , -T and -n
to be specified multiple times (Heikki Linnakangas)
This change prevents unnecessary errors when removing old objects.
The new --if-exists option
- for APP-PGDUMP">, ">,
- and APP-PGRESTORE"> is only available
+ for app-pgdump">, ">,
+ and app-pgrestore"> is only available
when --clean is also specified.
- Add
BRIN">Block Range Indexes (
BRIN )
+ Add
brin">Block Range Indexes (
BRIN )
2015-05-15 [b0b7be6] Alvaro..: Add BRIN infrastructure for "inclusion" opclasses
-->
- Add
BRIN">Block Range Indexes (
BRIN )
+ Add
brin">Block Range Indexes (
BRIN )
(Álvaro Herrera)
Allow queries to perform accurate distance filtering of
bounding-box-indexed objects (polygons, circles) using
- linkend="GiST ">GiST indexes (Alexander Korotkov, Heikki
+ linkend="gist ">GiST indexes (Alexander Korotkov, Heikki
Linnakangas)
2015-03-30 [0633a60] Heikki..: Add index-only scan support to range type GiST ..
-->
- Allow GiST">GiST indexes to perform index-only
+ Allow gist">GiST indexes to perform index-only
scans (Anastasia Lubennikova, Heikki Linnakangas, Andreas Karlsson)
2014-09-02 [bd3b7a9] Fujii ..: Support ALTER SYSTEM RESET command.
-->
- Allow SQL-ALTERSYSTEM">ALTER SYSTEM
+ Allow sql-altersystem">ALTER SYSTEM
values to be reset with ALTER SYSTEM RESET (Vik
Fearing)
-->
Allow setting multiple target columns in
- an SQL-UPDATE">UPDATE from the result of
+ an sql-update">UPDATE from the result of
a single sub-SELECT (Tom Lane)
2014-10-07 [df630b0] Alvaro..: Implement SKIP LOCKED for row-level locks
-->
- Add SQL-SELECT">SELECT option
+ Add sql-select">SELECT option
SKIP LOCKED to skip locked rows (Thomas Munro)
2015-05-15 [f6d208d] Simon ..: TABLESAMPLE, SQL Standard and extensible
-->
- Add SQL-SELECT">SELECT option
+ Add sql-select">SELECT option
TABLESAMPLE to return a subset of a table (Petr
Jelínek)
-->
Add more details about sort ordering in
- linkend="SQL-EXPLAIN ">EXPLAIN output (Marius Timmer,
+ linkend="sql-explain ">EXPLAIN output (Marius Timmer,
Lukas Kreft, Arne Scheffer)
2014-12-18 [35192f0] Alvaro..: Have VACUUM log number of skipped pages due to ..
-->
- Make SQL-VACUUM">VACUUM log the
+ Make sql-vacuum">VACUUM log the
number of pages skipped due to pins (Jim Nasby)
2015-02-20 [d42358e] Alvaro..: Have TRUNCATE update pgstat tuple counters
-->
- Make SQL-TRUNCATE">TRUNCATE properly
+ Make sql-truncate">TRUNCATE properly
update the pg_stat * tuple counters (Alexander Shulgin)
-
SQL-REINDEX">
+
sql-reindex">
This feature allows row-by-row control over which users can add,
modify, or even see rows in a table. This is controlled by new
- commands
SQL-CREATEPOLICY">
CREATE /
- linkend="
SQL-ALTERPOLICY ">
ALTER /
- linkend="
SQL-DROPPOLICY ">
DROP POLICY and
- linkend="SQL-ALTERTABLE ">ALTER TABLE ... ENABLE/DISABLE
+ commands
sql-createpolicy">
CREATE /
+ linkend="
sql-alterpolicy ">
ALTER /
+ linkend="
sql-droppolicy ">
DROP POLICY and
+ linkend="sql-altertable ">ALTER TABLE ... ENABLE/DISABLE
ROW SECURITY.
Allow changing of the
WAL
logging status of a table after creation with
- linkend="SQL-ALTERTABLE ">ALTER TABLE ... SET LOGGED /
+ linkend="sql-altertable ">ALTER TABLE ... SET LOGGED /
UNLOGGED (Fabrízio de Royes Mello)
-->
Add
IF NOT EXISTS clause to
- linkend="SQL-CREATETABLEAS ">CREATE TABLE AS ,
- SQL-CREATEINDEX">CREATE INDEX ,
- SQL-CREATESEQUENCE">CREATE SEQUENCE ,
- and SQL-CREATEMATERIALIZEDVIEW">CREATE
+ linkend="sql-createtableas ">CREATE TABLE AS ,
+ sql-createindex">CREATE INDEX ,
+ sql-createsequence">CREATE SEQUENCE ,
+ and sql-creatematerializedview">CREATE
MATERIALIZED VIEW (Fabrízio de Royes Mello)
-->
Add support for
IF EXISTS to
- linkend="SQL-ALTERTABLE ">ALTER TABLE ... RENAME
+ linkend="sql-altertable ">ALTER TABLE ... RENAME
CONSTRAINT (Bruce Momjian)
This feature is now supported in
- SQL-ALTERUSER">, ">,
- SQL-ALTERROLE">, ">,
+ sql-alteruser">, ">,
+ sql-alterrole">, ">,
and ALTER object OWNER TO commands.
2014-12-23 [7eca575] Alvaro..: get_object_address: separate domain constraints..
-->
- Support comments on SQL-CREATEDOMAIN">domain
+ Support comments on sql-createdomain">domain
constraints (Álvaro Herrera)
2015-05-11 [fa26424] Stephe..: Allow LOCK TABLE .. ROW EXCLUSIVE MODE with IN..
-->
- Allow SQL-LOCK">LOCK TABLE ... ROW EXCLUSIVE
+ Allow sql-lock">LOCK TABLE ... ROW EXCLUSIVE
MODE for those with INSERT privileges on the
target table (Stephen Frost)
-->
Allow
- linkend="
SQL-CREATEDATABASE ">
CREATE /
- linkend="SQL-ALTERDATABASE ">ALTER DATABASE
+ linkend="
sql-createdatabase ">
CREATE /
+ linkend="sql-alterdatabase ">ALTER DATABASE
to manipulate datistemplate and
datallowconn (Vik Fearing)
2014-07-10 [59efda3] Tom Lane: Implement IMPORT FOREIGN SCHEMA.
-->
- Add support for SQL-IMPORTFOREIGNSCHEMA">
+ Add support for sql-importforeignschema">
(Ronan Dunklau, Michael Paquier, Tom Lane)
-->
Allow event triggers on table rewrites caused by
- linkend="SQL-ALTERTABLE ">ALTER TABLE (Dimitri
+ linkend="sql-altertable ">ALTER TABLE (Dimitri
Fontaine)
-->
Add event trigger support for database-level
- linkend="
SQL-COMMENT ">
COMMENT ,
- linkend="SQL-SECURITY-LABEL ">SECURITY LABEL ,
- and
SQL-GRANT">
GRANT /
- linkend="SQL-REVOKE ">REVOKE (Álvaro Herrera)
+ linkend="
sql-comment ">
COMMENT ,
+ linkend="sql-security-label ">SECURITY LABEL ,
+ and
sql-grant">
GRANT /
+ linkend="sql-revoke ">REVOKE (Álvaro Herrera)
This change adds new commands
- linkend="
SQL-CREATETRANSFORM ">
CREATE /
- linkend="SQL-DROPTRANSFORM ">DROP TRANSFORM .
+ linkend="
sql-createtransform ">
CREATE /
+ linkend="sql-droptransform ">DROP TRANSFORM .
This also adds optional transformations between the
linkend="hstore">
hstore and
linkend="ltree">
ltree types to/from
2015-01-23 [a179232] Alvaro..: vacuumdb: enable parallel mode
-->
- Allow
APP-VACUUMDB">
vacuumdb to
+ Allow
app-vacuumdb">
vacuumdb to
vacuum in parallel using new --jobs option (Dilip Kumar)
2015-11-12 [5094da9] Alvaro..: vacuumdb: don't prompt for passwords over and ..
-->
- In
APP-VACUUMDB">
vacuumdb , do not
+ In
app-vacuumdb">
vacuumdb , do not
prompt for the same password repeatedly when multiple connections
are necessary (Haribabu Kommi, Michael Paquier)
-->
Add
--verbose option to
- linkend="
APP-REINDEXDB ">
reindexdb (Sawada
+ linkend="
app-reindexdb ">
reindexdb (Sawada
Masahiko)
-
APP-PSQL">
+
app-psql">
-->
Add new option
%l in
psql 's
- linkend="APP-PSQL -variables">PROMPT variables
+ linkend="app-psql -variables">PROMPT variables
to display the current multiline statement line number
(Sawada Masahiko)
-->
Add
\pset option
- linkend="APP-PSQL -meta-commands">pager_min_lines
+ linkend="app-psql -meta-commands">pager_min_lines
to control pager invocation (Andrew Dunstan)
-
APP-PSQL-meta-commands">Backslash Commands
+
app-psql-meta-commands">Backslash Commands
-
APP-PGDUMP">
+
app-pgdump">
2014-11-21 [3a82bc6] Heikki..: Add pageinspect functions for inspecting GIN in..
-->
index inspection functions to
linkend="pageinspect">
pageinspect (Heikki
Linnakangas, Peter Geoghegan, Michael Paquier)
2015-09-02 [30bb26b5e] Allow usage of huge maintenance_work_mem for GIN build.
-->
- Allow
GIN">
GIN index builds to
+ Allow
gin">
GIN index builds to
make effective use of
settings larger than 1 GB (Robert Abraham, Teodor Sigaev)
-->
Improve handling of dead index tuples in
- linkend="GiST ">GiST indexes (Anastasia Lubennikova)
+ linkend="gist ">GiST indexes (Anastasia Lubennikova)
2016-03-30 [acdf2a8b3] Introduce SP-GiST operator class over box.
-->
- Add an SPGiST">SP-GiST operator class for
+ Add an spgist">SP-GiST operator class for
type box (Alexander Lebedev)
-->
Add a --strict-names option
- and
APP-PGRESTORE">
pg_restore
+ and
app-pgrestore">
pg_restore
(Pavel Stehule)
-
APP-PSQL">
+
app-psql">
execution. It is very powerful, and can be used for many things
such as query language procedures, views, and versions. The
theoretical foundations and the power of this rule system are
- also discussed in
STON90b"> and
- linkend="ONG 90">.
+ also discussed in
ston90b"> and
+ linkend="ong 90">.
-SPGiST">
+spgist">
SP-GiST Indexes
More about createdb and dropdb can
- be found in APP-CREATEDB"> and ">
+ be found in app-createdb"> and ">
respectively.
- See also the APP-PSQL-meta-commands-crosstabview">\crosstabview
+ See also the app-psql-meta-commands-crosstabview">\crosstabview
command in
psql , which provides functionality similar
to crosstab() .
- Cpp">
+ cpp">
Using C++ for Extensibility
- Cpp">
+ cpp">
GiST indexes have nine support functions, two of which are optional,
as shown in .
- (For more information see GiST">.)
+ (For more information see gist">.)
SP-GiST indexes require five support functions, as
shown in .
- (For more information see SPGiST">.)
+ (For more information see spgist">.)
GIN indexes have six support functions, three of which are optional,
as shown in .
- (For more information see GIN">.)
+ (For more information see gin">.)