forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc5b7f79
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 parent59bc0df commitc5b7f79
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 | |
---|---|---|---|
| |||
1475 | 1475 |
| |
1476 | 1476 |
| |
1477 | 1477 |
| |
1478 |
| - | |
| 1478 | + | |
| 1479 | + | |
1479 | 1480 |
| |
1480 | 1481 |
| |
1481 | 1482 |
| |
| |||
1563 | 1564 |
| |
1564 | 1565 |
| |
1565 | 1566 |
| |
1566 |
| - | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1567 | 1571 |
| |
1568 |
| - | |
| 1572 | + | |
| 1573 | + | |
1569 | 1574 |
| |
1570 |
| - | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1571 | 1578 |
| |
1572 | 1579 |
| |
1573 | 1580 |
| |
| |||
1618 | 1625 |
| |
1619 | 1626 |
| |
1620 | 1627 |
| |
1621 |
| - | |
| 1628 | + | |
1622 | 1629 |
| |
1623 |
| - | |
| 1630 | + | |
1624 | 1631 |
| |
1625 | 1632 |
| |
1626 |
| - | |
1627 | 1633 |
| |
1628 | 1634 |
| |
1629 | 1635 |
| |
|
Lines changed: 22 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7249 | 7249 |
| |
7250 | 7250 |
| |
7251 | 7251 |
| |
7252 |
| - | |
| 7252 | + | |
| 7253 | + | |
| 7254 | + | |
| 7255 | + | |
7253 | 7256 |
| |
| 7257 | + | |
| 7258 | + | |
7254 | 7259 |
| |
7255 | 7260 |
| |
7256 | 7261 |
| |
| 7262 | + | |
| 7263 | + | |
| 7264 | + | |
7257 | 7265 |
| |
7258 |
| - | |
| 7266 | + | |
7259 | 7267 |
| |
7260 |
| - | |
7261 |
| - | |
| 7268 | + | |
7262 | 7269 |
| |
7263 | 7270 |
| |
7264 | 7271 |
| |
7265 | 7272 |
| |
7266 |
| - | |
7267 |
| - | |
| 7273 | + | |
7268 | 7274 |
| |
7269 | 7275 |
| |
7270 | 7276 |
| |
| |||
7356 | 7362 |
| |
7357 | 7363 |
| |
7358 | 7364 |
| |
7359 |
| - | |
| 7365 | + | |
7360 | 7366 |
| |
7361 | 7367 |
| |
7362 | 7368 |
| |
7363 | 7369 |
| |
7364 | 7370 |
| |
7365 | 7371 |
| |
7366 | 7372 |
| |
7367 |
| - | |
7368 |
| - | |
7369 |
| - | |
| 7373 | + | |
| 7374 | + | |
| 7375 | + | |
7370 | 7376 |
| |
7371 | 7377 |
| |
7372 |
| - | |
| 7378 | + | |
7373 | 7379 |
| |
7374 | 7380 |
| |
7375 | 7381 |
| |
| 7382 | + | |
| 7383 | + | |
| 7384 | + | |
7376 | 7385 |
| |
7377 |
| - | |
| 7386 | + | |
7378 | 7387 |
| |
7379 |
| - | |
7380 |
| - | |
7381 |
| - | |
| 7388 | + | |
7382 | 7389 |
| |
7383 | 7390 |
| |
7384 | 7391 |
| |
|
Lines changed: 60 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1203 | 1203 |
| |
1204 | 1204 |
| |
1205 | 1205 |
| |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 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 | + | |
1206 | 1266 |
| |
1207 | 1267 |
| |
1208 | 1268 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
483 | 483 |
| |
484 | 484 |
| |
485 | 485 |
| |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
486 | 511 |
| |
487 | 512 |
| |
488 | 513 |
| |
|
0 commit comments
Comments
(0)