forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9e6faeb
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 parent75929b6 commit9e6faeb
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 | |
---|---|---|---|
| |||
1006 | 1006 |
| |
1007 | 1007 |
| |
1008 | 1008 |
| |
1009 |
| - | |
| 1009 | + | |
1010 | 1010 |
| |
1011 |
| - | |
| 1011 | + | |
1012 | 1012 |
| |
1013 | 1013 |
| |
1014 | 1014 |
| |
1015 | 1015 |
| |
1016 | 1016 |
| |
1017 |
| - | |
| 1017 | + | |
1018 | 1018 |
| |
1019 | 1019 |
| |
1020 | 1020 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
230 |
| - | |
| 230 | + | |
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
178 | 183 |
| |
179 | 184 |
| |
180 | 185 |
| |
181 | 186 |
| |
182 | 187 |
| |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 |
| |
184 | 194 |
| |
185 | 195 |
| |
|
0 commit comments
Comments
(0)