postgresql/src/bin
Tomas Vondra 276b7888f1 createdb: compare strategy case-insensitive
When specifying the createdb strategy, the documentation suggests valid
options are FILE_COPY and WAL_LOG, but the code does case-sensitive
comparison and accepts only "file_copy" and "wal_log" as valid.

Fixed by doing a case-insensitive comparison using pg_strcasecmp(), same
as for other string parameters nearby.

While at it, apply fmtId() to a nearby "locale_provider". This already
did the comparison in case-insensitive way, but the value would not be
double-quoted, confusing the parser and the error message.

Backpatch to 15, where the strategy was introduced.

Backpatch-through: 15
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/90c6913a-1dd2-42b4-8365-ce3b09c39b17@enterprisedb.com
2024-04-21 21:22:11 +02:00
..
initdb Translation updates 2023-11-06 13:16:22 +01:00
pg_amcheck Handle DROP DATABASE getting interrupted 2023-07-13 13:04:45 -07:00
pg_archivecleanup Translation updates 2023-05-08 14:29:57 +02:00
pg_basebackup Skip .DS_Store files in server side utils 2024-02-13 13:47:12 +01:00
pg_checksums Skip .DS_Store files in server side utils 2024-02-13 13:47:12 +01:00
pg_config Translation updates 2023-11-06 13:16:22 +01:00
pg_controldata Translation updates 2023-11-06 13:16:22 +01:00
pg_ctl pg_ctl: Disable autoruns for cmd.exe on Windows 2024-01-12 13:53:10 +09:00
pg_dump Fix dumping role comments when using --no-role-passwords 2024-03-21 23:31:57 +01:00
pg_resetwal Translation updates 2023-11-06 13:16:22 +01:00
pg_rewind Skip .DS_Store files in server side utils 2024-02-13 13:47:12 +01:00
pg_test_fsync Translation updates 2023-05-08 14:29:57 +02:00
pg_test_timing Translation updates 2023-05-08 14:29:57 +02:00
pg_upgrade Translation updates 2024-02-05 14:47:58 +01:00
pg_verifybackup Translation updates 2023-11-06 13:16:22 +01:00
pg_waldump Translation updates 2024-02-05 14:47:58 +01:00
pgbench Abort pgbench if script end is reached with an open pipeline 2024-01-22 17:48:30 +01:00
pgevent Update copyright for 2022 2022-01-07 19:04:57 -05:00
psql In psql, avoid leaking a PGresult after a query is cancelled. 2024-04-08 17:00:07 -04:00
scripts createdb: compare strategy case-insensitive 2024-04-21 21:22:11 +02:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00