postgresql/src/bin/scripts
Tomas Vondra 8c239ee15a 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:21:26 +02:00
..
po Update copyright for 2024 2024-01-03 20:49:05 -05:00
t createdb: compare strategy case-insensitive 2024-04-21 21:21:26 +02:00
.gitignore Remove createlang and droplang 2017-03-23 14:16:45 -04:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
clusterdb.c clusterdb: Allow specifying tables to process in all databases. 2024-03-11 13:11:20 -05:00
common.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
common.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
createdb.c createdb: compare strategy case-insensitive 2024-04-21 21:21:26 +02:00
createuser.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
dropdb.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
dropuser.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls.mk Break up long GETTEXT_FILES lists 2023-03-08 15:05:43 +01:00
pg_isready.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
reindexdb.c reindexdb: Fix warning about uninitialized indices_tables_cell 2024-03-25 11:40:25 +02:00
vacuumdb.c vacuumdb: Allow specifying objects to process in all databases. 2024-03-11 10:33:36 -05:00