Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Popular entries9981
pg_dump --on-conflict-do-nothingon-conflict-do-nothing
Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts, --column-inserts or --rows-per-insert is also specified.
pg_dump --passwordW--password
Force pg_dump to prompt for a password before connecting to a database. This option is never essential, since pg_dump will automatically prompt for a password if the server deman…
pg_dump --port=portp port--port=port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or …
pg_dump --quote-all-identifiersquote-all-identifiers
Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dump's, or when t…
pg_dump --restrict-key=restrict_keyrestrict-key=restrict_key
Use the provided string as the psql \restrict key in the dump output. This can only be specified for plain-text dumps, i.e., when --format is set to plain or the --…
pg_dump --role=rolenamerole=rolename
Specifies a role name to be used to create the dump. This option causes pg_dump to issue a SET ROLE rolename command after connecting to the database. It is useful when the aut…
pg_dump --rows-per-insert=nrowsrows-per-insert=nrows
Dump data as INSERT commands (rather than COPY). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any err…
pg_dump --schema-onlys--schema-only
Dump only the object definitions (schema), not data or statistics. This option cannot be used with --data-only or --statistics-only. It is similar to, but for historical reaso…
pg_dump --schema=patternn pattern--schema=pattern
Dump only schemas matching pattern; this selects both the schema itself, and all its contained objects. When this option is not specified, all non-system schemas in…
pg_dump --section=sectionnamesection=sectionname
Only dump the named section. The section name can be pre-data, data, or post-data. This option can be specified more than once to select multiple sections. The default is…
pg_dump --sequence-datasequence-data
Include sequence data in the dump. This is the default behavior except when --no-data, --schema-only, or --statistics-only is specified.
pg_dump --serializable-deferrableserializable-deferrable
Use a serializable transaction for the dump, to ensure that the snapshot used is consistent with later database states; but do this by waiting for a point in the tran…
pg_dump --snapshot=snapshotnamesnapshot=snapshotname
Use the specified synchronized snapshot when making a dump of the database (see Table 9.100 for more details). This option is useful when needing to synchronize the dum…
pg_dump --statisticsstatistics
Dump optimizer statistics.
pg_dump --statistics-onlystatistics-only
Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.
pg_dump --strict-namesstrict-names
Require that each extension (-e/--extension), schema (-n/--schema) and table (-t/--table) pattern match at least one extension/schema/table in the database to be dumped. This al…
pg_dump --superuser=usernameS username--superuser=username
Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, a…
pg_dump --sync-method=methodsync-method=method
When set to fsync, which is the default, pg_dump --format=directory will recursively open and synchronize all files in the archive directory. On Linux, syncfs may be used …
pg_dump --table-and-children=patterntable-and-children=pattern
This is the same as the -t/--table option, except that it also includes any partitions or inheritance child tables of the table(s) matching the pattern.
pg_dump --table=patternt pattern--table=pattern
Dump only tables with names matching pattern. Multiple tables can be selected by writing multiple -t switches. The pattern parameter is interpreted as a pattern acco…
pg_dump --use-set-session-authorizationuse-set-session-authorization
Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards-compati…
pg_dump --username=usernameU username--username=username
User name to connect as.
pg_dump --verbosev--verbose
Specifies verbose mode. This will cause pg_dump to output detailed object comments and start/stop times to the dump file, and progress messages to standard error. Repeating the op…
pg_dump --versionV--version
Print the pg_dump version and exit.
pg_dump/pg_dumpall/pg_restoreAdd pg_dump option --statistics (Jeff Davis) § § Add pg_dump and pg_dumpall option --sequence-data to dump sequence data that would normally be excluded (Nathan Bossart) § § Add pg_dump, pg_…
pg_dumpallextract a PostgreSQL database cluster into a script file
Synopsis pg_dumpall [connection-option...] [option...]
pg_dumpallextract a PostgreSQL database cluster into a script file
Synopsis pg_dumpall [connection-option...] [option...]
pg_dumpall --attribute-insertscolumn-inserts--attribute-inserts
Dump data as INSERT commands with explicit column names (INSERT INTO table (column, ...) VALUES ...). This will make restoration very slow; it is mainly use…
pg_dumpall --binary-upgradebinary-upgrade
This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases with…
pg_dumpall --cleanc--clean
Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any…
pg_dumpall --data-onlya--data-only
Dump only the data, not the schema (data definitions) or statistics.
pg_dumpall --database=dbnamel dbname--database=dbname
Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres da…
pg_dumpall --dbname=connstrd connstr--dbname=connstr
Specifies parameters used to connect to the server, as a connection string; these will override any conflicting command line options. The option is called --dbname …
pg_dumpall --disable-dollar-quotingdisable-dollar-quoting
This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.
pg_dumpall --disable-triggersdisable-triggers
This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tab…
pg_dumpall --encoding=encodingE encoding--encoding=encoding
Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set…
pg_dumpall --exclude-database=patternexclude-database=pattern
Do not dump databases whose name matches pattern. Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpr…
pg_dumpall --extra-float-digits=ndigitsextra-float-digits=ndigits
Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes …
pg_dumpall --file=filenamef filename--file=filename
Send output to the specified file. If this is omitted, the standard output is used.
pg_dumpall --filter=filenamefilter=filename
Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database. To read f…
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
Searching every version by default. Manual pages are indexed for PostgreSQL 10–20; the reference library and extension catalogue are not version-bound.
all: every version pg17: one version ex: extensions only ↑↓ select ↵ open