postgresql/doc/src/sgml/ref
Michael Paquier d18655cc03 Refactor code parsing compression option values (-Z/--compress)
This commit moves the code in charge of deparsing the method and detail
strings fed later to parse_compress_specification() to a common routine,
where the backward-compatible case of only an integer being found (N
= 0 => "none", N > 1 => gzip at level N) is handled.

Note that this has a side-effect for pg_basebackup, as we now attempt to
detect "server-" and "client-" before checking for the integer-only
pre-14 grammar, where values like server-N and client-N (without the
follow-up detail string) are now valid rather than failing because of an
unsupported method name.  Past grammars are still handled the same way,
but these flavors are now authorized, and would now switch to consider N
= 0 as no compression and N > 1 as gzip with the compression level used
as N, with the caller still controlling if the compression method should
be done server-side, client-side or is unspecified.  The documentation
of pg_basebackup is updated to reflect that.

This benefits other code paths that would like to rely on the same logic
as pg_basebackup and pg_receivewal with option values used for
compression specifications, one area discussed lately being pg_dump.

Author: Georgios Kokolatos, Michael Paquier
Discussion: https://postgr.es/m/O4mutIrCES8ZhlXJiMvzsivT7ztAMja2lkdL1LJx6O5f22I2W8PBIeLKz7mDLwxHoibcnRAYJXm1pH4tyUNC4a8eDzLn22a6Pb1S74Niexg=@pm.me
2022-11-30 09:34:32 +09:00
..
abort.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
allfiles.sgml Add support for MERGE SQL command 2022-03-28 16:47:48 +02:00
alter_aggregate.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
alter_collation.sgml Database-level collation version tracking 2022-02-14 08:27:26 +01:00
alter_conversion.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_database.sgml Database-level collation version tracking 2022-02-14 08:27:26 +01:00
alter_default_privileges.sgml Provide per-table permissions for vacuum and analyze. 2022-11-28 12:08:14 -05:00
alter_domain.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
alter_event_trigger.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_extension.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
alter_foreign_data_wrapper.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_foreign_table.sgml Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT". 2022-11-10 18:20:49 -05:00
alter_function.sgml doc: clarify how dropping of extensions affects dependent objs. 2022-07-14 17:41:03 -04:00
alter_group.sgml Make role grant system more consistent with other privileges. 2022-08-22 11:35:17 -04:00
alter_index.sgml Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
alter_language.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_large_object.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_materialized_view.sgml Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT". 2022-11-10 18:20:49 -05:00
alter_opclass.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_operator.sgml Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
alter_opfamily.sgml Use the correct article for abbreviations 2021-06-11 13:38:04 +12:00
alter_policy.sgml doc: Improve hyphenation consistency 2021-04-21 08:14:43 +02:00
alter_procedure.sgml doc: clarify how dropping of extensions affects dependent objs. 2022-07-14 17:41:03 -04:00
alter_publication.sgml Allow publications with schema and table of the same schema. 2022-09-23 08:21:26 +05:30
alter_role.sgml Allow users with BYPASSRLS to alter their own passwords. 2020-11-03 15:41:32 -05:00
alter_routine.sgml Doc: fix confusion about LEAKPROOF in syntax summaries. 2021-06-23 14:27:13 -04:00
alter_rule.sgml
alter_schema.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_sequence.sgml Unlogged sequences 2022-04-07 16:18:00 +02:00
alter_server.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_statistics.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
alter_subscription.sgml Raise a warning if there is a possibility of data from multiple origins. 2022-09-08 06:54:13 +05:30
alter_system.sgml Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
alter_table.sgml Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT". 2022-11-10 18:20:49 -05:00
alter_tablespace.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_trigger.sgml Make ALTER TRIGGER RENAME consistent for partitioned tables 2021-07-22 18:33:47 -04:00
alter_tsconfig.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_tsdictionary.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_tsparser.sgml Convert documentation to DocBook XML 2017-11-23 09:44:28 -05:00
alter_tstemplate.sgml
alter_type.sgml doc: use wording "restore" instead of "reload" of dumps 2022-07-21 14:55:23 -04:00
alter_user_mapping.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_user.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
alter_view.sgml Add support for security invoker views. 2022-03-22 10:28:10 +00:00
analyze.sgml Provide non-superuser predefined roles for vacuum and analyze 2022-11-28 12:08:14 -05:00
begin.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
call.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
checkpoint.sgml Rename pg_checkpointer predefined role to pg_checkpoint. 2022-07-05 13:31:42 -04:00
close.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
cluster.sgml Allow CLUSTER on partitioned tables 2022-04-02 19:08:34 +02:00
clusterdb.sgml Fix connection string handling in src/bin/scripts/ programs. 2020-10-19 19:03:46 -04:00
comment.sgml plpython: Adjust docs after removal of Python 2 support. 2022-03-07 18:30:57 -08:00
commit_prepared.sgml doc: Remove unused title ids 2020-03-13 15:45:37 +01:00
commit.sgml Fix behavior of AND CHAIN outside of explicit transaction blocks 2019-09-08 16:23:03 +02:00
copy.sgml doc: Minor wordsmithing to COPY docs 2022-08-22 15:08:45 +02:00
create_access_method.sgml
create_aggregate.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_cast.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_collation.sgml Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
create_conversion.sgml Add 'noError' argument to encoding conversion functions. 2021-04-01 11:45:22 +03:00
create_database.sgml Make locale option behavior more consistent 2022-09-13 14:28:10 +02:00
create_domain.sgml doc: use wording "restore" instead of "reload" of dumps 2022-07-21 14:55:23 -04:00
create_event_trigger.sgml doc: Add missing markup in CREATE EVENT TRIGGER page 2021-09-25 14:48:03 +09:00
create_extension.sgml doc: Fix man page whitespace issues 2021-04-09 23:36:46 +02:00
create_foreign_data_wrapper.sgml
create_foreign_table.sgml Doc: Further fix CREATE FOREIGN TABLE synopsis. 2022-06-02 18:00:00 +09:00
create_function.sgml revert "warn of SECURITY DEFINER schemas for non-sql_body funcs" 2022-09-28 13:05:21 -04:00
create_group.sgml Doc: sync CREATE GROUP syntax synopsis with CREATE ROLE. 2020-04-10 10:44:09 -04:00
create_index.sgml doc: mention "bloom" as a possible index access method 2022-08-31 22:35:09 -04:00
create_language.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_materialized_view.sgml Doc: be more precise about conflicts between relation names. 2021-11-02 12:12:02 -04:00
create_opclass.sgml Use the correct article for abbreviations 2021-06-11 13:38:04 +12:00
create_operator.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_opfamily.sgml
create_policy.sgml Add support for MERGE SQL command 2022-03-28 16:47:48 +02:00
create_procedure.sgml doc: Fix man page whitespace issues 2021-04-09 23:36:46 +02:00
create_publication.sgml Fix typo in CREATE PUBLICATION reference page 2022-10-13 13:36:14 +02:00
create_role.sgml Allow grant-level control of role inheritance behavior. 2022-08-25 10:06:02 -04:00
create_rule.sgml
create_schema.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
create_sequence.sgml doc: fix wrong tag used in create sequence manual. 2022-08-16 09:20:14 +09:00
create_server.sgml
create_statistics.sgml doc: in create statistics docs, mention analyze for parent info 2022-08-31 23:11:46 -04:00
create_subscription.sgml Doc: Update information about manually creating slots. 2022-11-02 11:40:37 +05:30
create_table_as.sgml doc: clarify CREATE TABLE AS ... IF NOT EXISTS 2022-08-12 10:59:00 -04:00
create_table.sgml Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT". 2022-11-10 18:20:49 -05:00
create_tablespace.sgml Remove configure probes for symlink/readlink, and dead code. 2022-08-05 09:22:56 +12:00
create_transform.sgml plpython: Adjust docs after removal of Python 2 support. 2022-03-07 18:30:57 -08:00
create_trigger.sgml Support TRUNCATE triggers on foreign tables. 2022-07-12 09:18:02 +09:00
create_tsconfig.sgml
create_tsdictionary.sgml
create_tsparser.sgml
create_tstemplate.sgml
create_type.sgml Fix some typos, grammar and style in docs and comments 2021-02-24 16:13:17 +09:00
create_user_mapping.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
create_user.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_view.sgml Add support for security invoker views. 2022-03-22 10:28:10 +00:00
createdb.sgml Add new block-by-block strategy for CREATE DATABASE. 2022-03-29 11:48:36 -04:00
createuser.sgml createuser: Add support for more clause types through new options 2022-07-13 12:21:20 +09:00
deallocate.sgml
declare.sgml Avoid misbehavior when persisting a non-stable cursor. 2021-06-08 17:50:29 -04:00
delete.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
discard.sgml
do.sgml doc: Remove unused title ids 2020-03-13 15:45:37 +01:00
drop_access_method.sgml
drop_aggregate.sgml
drop_cast.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_collation.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_conversion.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_database.sgml doc: Trim trailing whitespace 2020-06-07 13:24:40 +02:00
drop_domain.sgml
drop_event_trigger.sgml
drop_extension.sgml doc: clarify DROP EXTENSION dependent members text 2022-08-12 09:07:11 -04:00
drop_foreign_data_wrapper.sgml
drop_foreign_table.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_function.sgml doc: Fix man page whitespace issues 2020-06-07 14:54:28 +02:00
drop_group.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_index.sgml doc: Clarify use of ACCESS EXCLUSIVE lock in various sections 2021-04-01 15:28:37 +09:00
drop_language.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_materialized_view.sgml
drop_opclass.sgml
drop_operator.sgml Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
drop_opfamily.sgml
drop_owned.sgml Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
drop_policy.sgml doc: Improve hyphenation consistency 2021-04-21 08:14:43 +02:00
drop_procedure.sgml doc: Fix man page whitespace issues 2022-04-07 18:25:12 +02:00
drop_publication.sgml
drop_role.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_routine.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
drop_rule.sgml
drop_schema.sgml
drop_sequence.sgml
drop_server.sgml
drop_statistics.sgml doc: Mention CASCADE/RESTRICT for DROP STATISTICS 2021-07-19 12:39:38 +09:00
drop_subscription.sgml Allow multiple xacts during table sync in logical replication. 2021-02-12 07:41:51 +05:30
drop_table.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_tablespace.sgml
drop_transform.sgml plpython: Adjust docs after removal of Python 2 support. 2022-03-07 18:30:57 -08:00
drop_trigger.sgml
drop_tsconfig.sgml
drop_tsdictionary.sgml
drop_tsparser.sgml
drop_tstemplate.sgml
drop_type.sgml
drop_user_mapping.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
drop_user.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_view.sgml
dropdb.sgml Fix connection string handling in src/bin/scripts/ programs. 2020-10-19 19:03:46 -04:00
dropuser.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
ecpg-ref.sgml Fix our getopt_long's behavior for a command line argument of just "-". 2020-03-23 11:58:00 -04:00
end.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
execute.sgml Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs. 2020-05-11 14:15:55 -04:00
explain.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
fetch.sgml doc: show direction is optional in FETCH/MOVE's FROM/IN syntax 2022-08-31 19:29:06 -04:00
grant.sgml Provide per-table permissions for vacuum and analyze. 2022-11-28 12:08:14 -05:00
import_foreign_schema.sgml
initdb.sgml Fix typo 2022-11-18 12:53:49 +01:00
insert.sgml doc: clarify that "excluded" ON CONFLICT is a single row 2022-07-14 15:33:28 -04:00
listen.sgml Doc: improve discussion of race conditions involved in LISTEN. 2019-11-24 18:03:39 -05:00
load.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
lock.sgml Add support for security invoker views. 2022-03-22 10:28:10 +00:00
merge.sgml Doc fixes for MERGE statement 2022-09-09 13:51:45 +02:00
move.sgml doc: show direction is optional in FETCH/MOVE's FROM/IN syntax 2022-08-31 19:29:06 -04:00
notify.sgml
pg_amcheck.sgml pg_amcheck: avoid unhelpful verification attempts. 2021-10-13 14:08:12 -07:00
pg_basebackup.sgml Refactor code parsing compression option values (-Z/--compress) 2022-11-30 09:34:32 +09:00
pg_checksums.sgml Remove some trailing whitespace in documentation files 2022-01-27 18:31:01 +01:00
pg_config-ref.sgml Add missing <application> tags in application doc <refentrytitle>s 2020-07-10 16:51:29 +02:00
pg_controldata.sgml doc: remove unnecessary blank before command option text 2020-12-03 11:33:24 -05:00
pg_ctl-ref.sgml Remove exclusive backup mode 2022-04-06 14:41:03 -04:00
pg_dump.sgml Doc: adjust misleading phrasing of a few cross-references. 2022-09-22 22:05:09 -04:00
pg_dumpall.sgml Doc: adjust misleading phrasing of a few cross-references. 2022-09-22 22:05:09 -04:00
pg_isready.sgml doc: libpq connection options can override command-line flags 2020-10-02 22:19:31 -04:00
pg_receivewal.sgml Restore archive_command documentation 2022-09-22 07:35:00 -04:00
pg_recvlogical.sgml Improve terminology 2022-09-23 21:18:17 -04:00
pg_resetwal.sgml doc: use wording "restore" instead of "reload" of dumps 2022-07-21 14:55:23 -04:00
pg_restore.sgml doc: use wording "restore" instead of "reload" of dumps 2022-07-21 14:55:23 -04:00
pg_rewind.sgml Docs: avoid confusing use of the word "synchronized" 2022-04-13 09:15:02 +12:00
pg_verifybackup.sgml Fix typos and grammar in docs and comments 2020-12-24 17:05:49 +09:00
pg_waldump.sgml Use the terminology "WAL file" not "log file" more consistently. 2022-09-14 18:40:58 -04:00
pgarchivecleanup.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
pgbench.sgml Add missing serial commas 2022-09-19 06:35:01 -04:00
pgtestfsync.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
pgtesttiming.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
pgupgrade.sgml Doc: further adjust notes about pg_upgrade_output.d. 2022-09-26 14:19:21 -04:00
postgres-ref.sgml Provide options for postmaster to kill child processes with SIGABRT. 2022-11-21 11:59:29 -05:00
postmaster.sgml doc: Remove unused ids 2020-03-07 14:04:09 +01:00
prepare_transaction.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
prepare.sgml Fix typos and grammar in docs and comments 2020-12-24 17:05:49 +09:00
psql-ref.sgml doc: Fix description of how the default user name is chosen 2022-11-24 09:04:50 +01:00
reassign_owned.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
refresh_materialized_view.sgml Doc: improve documentation about ORDER BY in matviews. 2021-11-29 12:13:12 -05:00
reindex.sgml Fix a few issues with REINDEX grammar 2022-07-26 10:16:26 +09:00
reindexdb.sgml Clarify that --system reindexes system catalogs *only* 2021-10-27 16:28:11 +02:00
release_savepoint.sgml doc: clarify the behavior of identically-named savepoints 2022-07-14 15:44:22 -04:00
reset.sgml
revoke.sgml Provide per-table permissions for vacuum and analyze. 2022-11-28 12:08:14 -05:00
rollback_prepared.sgml doc: Remove unused title ids 2020-03-13 15:45:37 +01:00
rollback_to.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
rollback.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
savepoint.sgml doc: clarify the behavior of identically-named savepoints 2022-07-14 15:44:22 -04:00
security_label.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
select_into.sgml Fix various typos, grammar and code style in comments and docs 2022-01-25 09:40:04 +09:00
select.sgml doc: split out the NATURAL/CROSS JOIN in SELECT syntax 2022-08-31 21:46:14 -04:00
set_constraints.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
set_role.sgml Add a SET option to the GRANT command. 2022-11-18 12:32:56 -05:00
set_session_auth.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
set_transaction.sgml docs: Fix snapshot name in SET TRANSACTION docs. 2022-09-22 12:54:26 +09:00
set.sgml doc: mention that SET TIME ZONE often needs to be quoted 2022-08-31 20:27:27 -04:00
show.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
start_transaction.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
truncate.sgml doc: Review for "Allow TRUNCATE command to truncate foreign tables". 2021-04-27 18:39:30 +09:00
unlisten.sgml
update.sgml doc: Make UPDATE FROM examples consistent 2022-03-29 14:53:20 +02:00
vacuum.sgml Provide non-superuser predefined roles for vacuum and analyze 2022-11-28 12:08:14 -05:00
vacuumdb.sgml Add --schema and --exclude-schema options to vacuumdb. 2022-07-31 16:46:13 -04:00
values.sgml doc: Properly punctuate "etc." 2022-05-19 09:42:17 +02:00