forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf61db90
committed
Fix postgres_fdw failure with whole-row Vars of type RECORD.
Commit86dc900 expects that FDWs can cope with whole-row Vars fortheir tables, even if the Vars are marked with vartype RECORDOID.Previously, whole-row Vars generated by the planner had vartype equalto the relevant table's rowtype OID. (The point behind this change isto enable sharing of resjunk columns across inheritance child tables.)It turns out that postgres_fdw fails to cope with this, though throughbad fortune none of its test cases exposed that. Things mostly work,but when we try to read back a value of such a Var, the expectedrowtype is not available to record_in(). Fortunately, it's notdifficult to hack up the tupdesc that controls this process tosubstitute the foreign table's rowtype for RECORDOID. Thus we cansolve the runtime problem while still sharing the resjunk columnwith other tables.Per report from Alexander Pyhalov.Discussion:https://postgr.es/m/7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru1 parent8f3c06c commitf61db90
File tree
3 files changed
+86
-2
lines changed- contrib/postgres_fdw
- expected
- sql
3 files changed
+86
-2
lines changedLines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5531 | 5531 |
| |
5532 | 5532 |
| |
5533 | 5533 |
| |
| 5534 | + | |
| 5535 | + | |
| 5536 | + | |
| 5537 | + | |
| 5538 | + | |
| 5539 | + | |
| 5540 | + | |
| 5541 | + | |
| 5542 | + | |
| 5543 | + | |
| 5544 | + | |
| 5545 | + | |
| 5546 | + | |
| 5547 | + | |
| 5548 | + | |
| 5549 | + | |
| 5550 | + | |
| 5551 | + | |
| 5552 | + | |
| 5553 | + | |
| 5554 | + | |
| 5555 | + | |
| 5556 | + | |
| 5557 | + | |
| 5558 | + | |
5534 | 5559 |
| |
5535 | 5560 |
| |
5536 | 5561 |
| |
|
Lines changed: 53 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1439 | 1439 |
| |
1440 | 1440 |
| |
1441 | 1441 |
| |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1442 | 1493 |
| |
1443 | 1494 |
| |
1444 | 1495 |
| |
| |||
1523 | 1574 |
| |
1524 | 1575 |
| |
1525 | 1576 |
| |
1526 |
| - | |
| 1577 | + | |
1527 | 1578 |
| |
1528 | 1579 |
| |
1529 | 1580 |
| |
| |||
2631 | 2682 |
| |
2632 | 2683 |
| |
2633 | 2684 |
| |
2634 |
| - | |
| 2685 | + | |
2635 | 2686 |
| |
2636 | 2687 |
| |
2637 | 2688 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1255 | 1255 |
| |
1256 | 1256 |
| |
1257 | 1257 |
| |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1258 | 1266 |
| |
1259 | 1267 |
| |
1260 | 1268 |
| |
|
0 commit comments
Comments
(0)