forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitae13f81
committed
Track nesting depth correctly when drilling down into RECORD Vars.
expandRecordVariable() failed to adjust the parse nesting structurecorrectly when recursing to inspect an outer-level Var. This couldresult in assertion failures or core dumps in corner cases.Likewise, get_name_for_var_field() failed to adjust the deparsenamespace stack correctly when recursing to inspect an outer-levelVar. In this case the likely result was a "bogus varno" errorwhile deparsing a view.Per bug #18077 from Jingzhou Fu. Back-patch to all supportedbranches.Richard Guo, with some adjustments by meDiscussion:https://postgr.es/m/18077-b9db97c6e0ab45d8@postgresql.org1 parent1988f87 commitae13f81
File tree
4 files changed
+120
-22
lines changed- src
- backend
- parser
- utils/adt
- test/regress
- expected
- sql
4 files changed
+120
-22
lines changedLines changed: 13 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1503 | 1503 |
| |
1504 | 1504 |
| |
1505 | 1505 |
| |
1506 |
| - | |
| 1506 | + | |
| 1507 | + | |
1507 | 1508 |
| |
1508 | 1509 |
| |
1509 | 1510 |
| |
| |||
1591 | 1592 |
| |
1592 | 1593 |
| |
1593 | 1594 |
| |
1594 |
| - | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1595 | 1599 |
| |
1596 |
| - | |
| 1600 | + | |
| 1601 | + | |
1597 | 1602 |
| |
1598 |
| - | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
1599 | 1606 |
| |
1600 | 1607 |
| |
1601 | 1608 |
| |
| |||
1646 | 1653 |
| |
1647 | 1654 |
| |
1648 | 1655 |
| |
1649 |
| - | |
| 1656 | + | |
1650 | 1657 |
| |
1651 |
| - | |
| 1658 | + | |
1652 | 1659 |
| |
1653 | 1660 |
| |
1654 |
| - | |
1655 | 1661 |
| |
1656 | 1662 |
| |
1657 | 1663 |
| |
|
Lines changed: 22 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7616 | 7616 |
| |
7617 | 7617 |
| |
7618 | 7618 |
| |
7619 |
| - | |
| 7619 | + | |
| 7620 | + | |
| 7621 | + | |
| 7622 | + | |
7620 | 7623 |
| |
| 7624 | + | |
| 7625 | + | |
7621 | 7626 |
| |
7622 | 7627 |
| |
7623 | 7628 |
| |
| 7629 | + | |
| 7630 | + | |
| 7631 | + | |
7624 | 7632 |
| |
7625 |
| - | |
| 7633 | + | |
7626 | 7634 |
| |
7627 |
| - | |
7628 |
| - | |
| 7635 | + | |
7629 | 7636 |
| |
7630 | 7637 |
| |
7631 | 7638 |
| |
7632 | 7639 |
| |
7633 |
| - | |
7634 |
| - | |
| 7640 | + | |
7635 | 7641 |
| |
7636 | 7642 |
| |
7637 | 7643 |
| |
| |||
7723 | 7729 |
| |
7724 | 7730 |
| |
7725 | 7731 |
| |
7726 |
| - | |
| 7732 | + | |
7727 | 7733 |
| |
7728 | 7734 |
| |
7729 | 7735 |
| |
7730 | 7736 |
| |
7731 | 7737 |
| |
7732 | 7738 |
| |
7733 | 7739 |
| |
7734 |
| - | |
7735 |
| - | |
7736 |
| - | |
| 7740 | + | |
| 7741 | + | |
| 7742 | + | |
7737 | 7743 |
| |
7738 | 7744 |
| |
7739 |
| - | |
| 7745 | + | |
7740 | 7746 |
| |
7741 | 7747 |
| |
7742 | 7748 |
| |
| 7749 | + | |
| 7750 | + | |
| 7751 | + | |
7743 | 7752 |
| |
7744 |
| - | |
| 7753 | + | |
7745 | 7754 |
| |
7746 |
| - | |
7747 |
| - | |
7748 |
| - | |
| 7755 | + | |
7749 | 7756 |
| |
7750 | 7757 |
| |
7751 | 7758 |
| |
|
Lines changed: 60 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1209 | 1209 |
| |
1210 | 1210 |
| |
1211 | 1211 |
| |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1212 | 1272 |
| |
1213 | 1273 |
| |
1214 | 1274 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
487 | 487 |
| |
488 | 488 |
| |
489 | 489 |
| |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
490 | 515 |
| |
491 | 516 |
| |
492 | 517 |
| |
|
0 commit comments
Comments
(0)