postgresql/src/backend/commands
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
..
Makefile Revert: Implement pg_wal_replay_wait() stored procedure 2024-04-11 17:28:15 +03:00
aggregatecmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
alter.c Remove ObjectClass type 2024-03-26 10:08:56 +01:00
amcmds.c Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
analyze.c revert: Generalize relation analyze in table AM interface 2024-04-16 13:14:20 +03:00
async.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
cluster.c Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
collationcmds.c Address more review comments on commit 2d819a08a1. 2024-03-18 11:58:13 -07:00
comment.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
constraint.c Add missing index_insert_cleanup calls 2024-04-19 16:08:34 +02:00
conversioncmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
copy.c Disallow specifying ON_ERROR option without value. 2024-04-17 11:31:27 +09:00
copyfrom.c Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
copyfromparse.c Remove obsolete comment in CopyReadLineText(). 2024-04-06 11:16:27 -04:00
copyto.c Add RETURNING support to MERGE. 2024-03-17 13:58:59 +00:00
createas.c Revert: Let table AM insertion methods control index insertion 2024-04-11 16:01:30 +03:00
dbcommands.c createdb: compare strategy case-insensitive 2024-04-21 21:21:26 +02:00
define.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
discard.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
dropcmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
event_trigger.c Fix typos with function name in event_trigger.c 2024-04-17 14:56:31 +09:00
explain.c Fix incorrect format placeholders 2024-04-09 14:33:06 +02:00
extension.c Explicitly list dependent types as extension members in pg_depend. 2024-03-04 14:49:36 -05:00
foreigncmds.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
functioncmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
indexcmds.c Add temporal FOREIGN KEY contraints 2024-03-24 07:37:13 +01:00
lockcmds.c Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
matview.c Revert: Let table AM insertion methods control index insertion 2024-04-11 16:01:30 +03:00
meson.build Revert: Implement pg_wal_replay_wait() stored procedure 2024-04-11 17:28:15 +03:00
opclasscmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
operatorcmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
policy.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
portalcmds.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
prepare.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
proclang.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
publicationcmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
schemacmds.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
seclabel.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
sequence.c Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
statscmds.c Initialize variables to placate compiler. 2024-03-17 20:16:15 -05:00
subscriptioncmds.c Add destroyStringInfo function for cleaning up StringInfos 2024-03-16 23:18:28 +01:00
tablecmds.c Better handle indirect constraint drops 2024-04-19 12:37:33 +02:00
tablespace.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
trigger.c Revert: Allow locking updated tuples in tuple_update() and tuple_delete() 2024-04-11 16:01:34 +03:00
tsearchcmds.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
typecmds.c Catalog domain not-null constraints 2024-03-20 10:05:37 +01:00
user.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
vacuum.c Revert: Custom reloptions for table AM 2024-04-11 15:46:35 +03:00
vacuumparallel.c Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
variable.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
view.c Separate equalRowTypes() from equalTupleDescs() 2024-03-17 05:58:04 +01:00