postgresql/src/include/common
Peter Eisentraut c96de2ce17 Common function for percent placeholder replacement
There are a number of places where a shell command is constructed with
percent-placeholders (like %x).  It's cumbersome to have to open-code
this several times.  This factors out this logic into a separate
function.  This also allows us to ensure consistency for and document
some subtle behaviors, such as what to do with unrecognized
placeholders.

The unified handling is now that incorrect and unknown placeholders
are an error, where previously in most cases they were skipped or
ignored.  This affects the following settings:

- archive_cleanup_command
- archive_command
- recovery_end_command
- restore_command
- ssl_passphrase_command

The following settings are part of this refactoring but already had
stricter error handling and should be unchanged in their behavior:

- basebackup_to_shell.command

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/5238bbed-0b01-83a6-d4b2-7eb0562a054e%40enterprisedb.com
2023-01-11 10:42:35 +01:00
..
archive.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
base64.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
checksum_helper.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
compression.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
config_info.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
connect.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
controldata_utils.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
cryptohash.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
fe_memutils.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
file_perm.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
file_utils.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
hashfn.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
hmac.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
int.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
int128.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
ip.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonapi.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
keywords.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
kwlookup.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
link-canary.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
logging.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
md5.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
openssl.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
percentrepl.h Common function for percent placeholder replacement 2023-01-11 10:42:35 +01:00
pg_lzcompress.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_prng.h Invent random_normal() to provide normally-distributed random numbers. 2023-01-09 12:44:00 -05:00
relpath.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
restricted_token.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
saslprep.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
scram-common.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
sha1.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
sha2.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
shortest_dec.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
string.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
unicode_east_asian_fw_table.h Update Unicode data to Unicode 15.0.0 2022-09-19 18:30:05 -04:00
unicode_nonspacing_table.h Update Unicode data to Unicode 15.0.0 2022-09-19 18:30:05 -04:00
unicode_norm.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
unicode_norm_hashfunc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
unicode_norm_table.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
unicode_normprops_table.h Update Unicode data to Unicode 15.0.0 2022-09-19 18:30:05 -04:00
username.h Update copyright for 2023 2023-01-02 15:00:37 -05:00