forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd29812c
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 parent8a15b41 commitd29812c
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 | |
---|---|---|---|
| |||
1472 | 1472 |
| |
1473 | 1473 |
| |
1474 | 1474 |
| |
1475 |
| - | |
| 1475 | + | |
| 1476 | + | |
1476 | 1477 |
| |
1477 | 1478 |
| |
1478 | 1479 |
| |
| |||
1554 | 1555 |
| |
1555 | 1556 |
| |
1556 | 1557 |
| |
1557 |
| - | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
1558 | 1562 |
| |
1559 |
| - | |
| 1563 | + | |
| 1564 | + | |
1560 | 1565 |
| |
1561 |
| - | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1562 | 1569 |
| |
1563 | 1570 |
| |
1564 | 1571 |
| |
| |||
1609 | 1616 |
| |
1610 | 1617 |
| |
1611 | 1618 |
| |
1612 |
| - | |
| 1619 | + | |
1613 | 1620 |
| |
1614 |
| - | |
| 1621 | + | |
1615 | 1622 |
| |
1616 | 1623 |
| |
1617 |
| - | |
1618 | 1624 |
| |
1619 | 1625 |
| |
1620 | 1626 |
| |
|
Lines changed: 22 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7189 | 7189 |
| |
7190 | 7190 |
| |
7191 | 7191 |
| |
7192 |
| - | |
| 7192 | + | |
| 7193 | + | |
| 7194 | + | |
| 7195 | + | |
7193 | 7196 |
| |
| 7197 | + | |
| 7198 | + | |
7194 | 7199 |
| |
7195 | 7200 |
| |
7196 | 7201 |
| |
| 7202 | + | |
| 7203 | + | |
| 7204 | + | |
7197 | 7205 |
| |
7198 |
| - | |
| 7206 | + | |
7199 | 7207 |
| |
7200 |
| - | |
7201 |
| - | |
| 7208 | + | |
7202 | 7209 |
| |
7203 | 7210 |
| |
7204 | 7211 |
| |
7205 | 7212 |
| |
7206 |
| - | |
7207 |
| - | |
| 7213 | + | |
7208 | 7214 |
| |
7209 | 7215 |
| |
7210 | 7216 |
| |
| |||
7296 | 7302 |
| |
7297 | 7303 |
| |
7298 | 7304 |
| |
7299 |
| - | |
| 7305 | + | |
7300 | 7306 |
| |
7301 | 7307 |
| |
7302 | 7308 |
| |
7303 | 7309 |
| |
7304 | 7310 |
| |
7305 | 7311 |
| |
7306 | 7312 |
| |
7307 |
| - | |
7308 |
| - | |
7309 |
| - | |
| 7313 | + | |
| 7314 | + | |
| 7315 | + | |
7310 | 7316 |
| |
7311 | 7317 |
| |
7312 |
| - | |
| 7318 | + | |
7313 | 7319 |
| |
7314 | 7320 |
| |
7315 | 7321 |
| |
| 7322 | + | |
| 7323 | + | |
| 7324 | + | |
7316 | 7325 |
| |
7317 |
| - | |
| 7326 | + | |
7318 | 7327 |
| |
7319 |
| - | |
7320 |
| - | |
7321 |
| - | |
| 7328 | + | |
7322 | 7329 |
| |
7323 | 7330 |
| |
7324 | 7331 |
| |
|
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)