forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8c239ee
committed
createdb: compare strategy case-insensitive
When specifying the createdb strategy, the documentation suggests validoptions are FILE_COPY and WAL_LOG, but the code does case-sensitivecomparison and accepts only "file_copy" and "wal_log" as valid.Fixed by doing a case-insensitive comparison using pg_strcasecmp(), sameas for other string parameters nearby.While at it, apply fmtId() to a nearby "locale_provider". This alreadydid the comparison in case-insensitive way, but the value would not bedouble-quoted, confusing the parser and the error message.Backpatch to 15, where the strategy was introduced.Backpatch-through: 15Reviewed-by: Tom LaneDiscussion:https://postgr.es/m/90c6913a-1dd2-42b4-8365-ce3b09c39b17@enterprisedb.com1 parenta3021aa commit8c239ee
File tree
3 files changed
+14
-4
lines changed- src
- backend/commands
- bin/scripts
- t
3 files changed
+14
-4
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1018 | 1018 |
| |
1019 | 1019 |
| |
1020 | 1020 |
| |
1021 |
| - | |
| 1021 | + | |
1022 | 1022 |
| |
1023 |
| - | |
| 1023 | + | |
1024 | 1024 |
| |
1025 | 1025 |
| |
1026 | 1026 |
| |
1027 | 1027 |
| |
1028 | 1028 |
| |
1029 |
| - | |
| 1029 | + | |
1030 | 1030 |
| |
1031 | 1031 |
| |
1032 | 1032 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
240 |
| - | |
| 240 | + | |
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
258 | 263 |
| |
259 | 264 |
| |
260 | 265 |
| |
261 | 266 |
| |
262 | 267 |
| |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
263 | 273 |
| |
264 | 274 |
| |
265 | 275 |
| |
|
0 commit comments
Comments
(0)