forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd037cc2
committed
Fix JsonExpr deparsing to quote variable names in the PASSING clause.
When deparsing a JsonExpr, variable names in the PASSING clause werenot quoted. However, since they are parsed as ColLabel tokens, somevariable names require double quotes to ensure that they are properlyinterpreted. Fix by using quote_identifier() in the deparsing code.This oversight was limited to the SQL/JSON query functionsJSON_EXISTS(), JSON_QUERY(), and JSON_VALUE().Back-patch to v17, where these functions were added.Dean Rasheed, reviewed by Tom Lane.Discussion:https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com1 parent61b1213 commitd037cc2
File tree
3 files changed
+22
-5
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+22
-5
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10250 | 10250 |
| |
10251 | 10251 |
| |
10252 | 10252 |
| |
10253 |
| - | |
| 10253 | + | |
10254 | 10254 |
| |
10255 | 10255 |
| |
10256 | 10256 |
| |
|
Lines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1084 | 1084 |
| |
1085 | 1085 |
| |
1086 | 1086 |
| |
1087 |
| - | |
| 1087 | + | |
1088 | 1088 |
| |
1089 | 1089 |
| |
1090 | 1090 |
| |
| |||
1101 | 1101 |
| |
1102 | 1102 |
| |
1103 | 1103 |
| |
1104 |
| - | |
| 1104 | + | |
1105 | 1105 |
| |
1106 | 1106 |
| |
1107 | 1107 |
| |
| |||
1116 | 1116 |
| |
1117 | 1117 |
| |
1118 | 1118 |
| |
1119 |
| - | |
| 1119 | + | |
1120 | 1120 |
| |
1121 | 1121 |
| |
1122 | 1122 |
| |
| |||
1366 | 1366 |
| |
1367 | 1367 |
| |
1368 | 1368 |
| |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1369 | 1383 |
| |
1370 | 1384 |
| |
1371 | 1385 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
330 |
| - | |
| 330 | + | |
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
| |||
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
| 468 | + | |
| 469 | + | |
| 470 | + | |
468 | 471 |
| |
469 | 472 |
| |
470 | 473 |
| |
|
0 commit comments
Comments
(0)