forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit276b788
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 parent6c85e33 commit276b788
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 | |
---|---|---|---|
| |||
994 | 994 |
| |
995 | 995 |
| |
996 | 996 |
| |
997 |
| - | |
| 997 | + | |
998 | 998 |
| |
999 |
| - | |
| 999 | + | |
1000 | 1000 |
| |
1001 | 1001 |
| |
1002 | 1002 |
| |
1003 | 1003 |
| |
1004 | 1004 |
| |
1005 |
| - | |
| 1005 | + | |
1006 | 1006 |
| |
1007 | 1007 |
| |
1008 | 1008 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
| 228 | + | |
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
156 | 161 |
| |
157 | 162 |
| |
158 | 163 |
| |
159 | 164 |
| |
160 | 165 |
| |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
161 | 171 |
|
0 commit comments
Comments
(0)