forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitee75a03
committed
SQL/JSON: Fix JSON_TABLE() column deparsing
The deparsing code in get_json_expr_options() unnecessarily emittedthe default column-specific ON ERROR / EMPTY behavior when thetop-level ON ERROR behavior in JSON_TABLE was set to ERROR. Fix thatby not overriding the column-specific default, determined based onthe column's JsonExprOp in get_json_table_columns(), withJSON_BEHAVIOR_ERROR when that is the top-level ON ERROR behavior.Note that this only removes redundancy; the current deparsing outputis not incorrect, just redundant.Reviewed-by: Jian He <jian.universality@gmail.com>Discussion:https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.comBackpatch-through: 171 parent4d7e24e commitee75a03
File tree
3 files changed
+37
-4
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+37
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11719 | 11719 |
| |
11720 | 11720 |
| |
11721 | 11721 |
| |
11722 |
| - | |
11723 | 11722 |
| |
11724 | 11723 |
| |
11725 | 11724 |
| |
| |||
11772 | 11771 |
| |
11773 | 11772 |
| |
11774 | 11773 |
| |
| 11774 | + | |
| 11775 | + | |
| 11776 | + | |
| 11777 | + | |
11775 | 11778 |
| |
11776 | 11779 |
| |
11777 | 11780 |
| |
| |||
11795 | 11798 |
| |
11796 | 11799 |
| |
11797 | 11800 |
| |
11798 |
| - | |
11799 |
| - | |
11800 |
| - | |
11801 | 11801 |
| |
11802 | 11802 |
| |
11803 | 11803 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1132 | 1132 |
| |
1133 | 1133 |
| |
1134 | 1134 |
| |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + |
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
542 | 542 |
| |
543 | 543 |
| |
544 | 544 |
| |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + |
0 commit comments
Comments
(0)