forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2b0ee12
committed
Fix usage of "tableoid" in GENERATED expressions.
We consider this supported (though I've got my doubts that it's agood idea, because tableoid is not immutable). However, severalcode paths failed to fill the field in soon enough, causing sucha GENERATED expression to see zero or the wrong value. Thisoccurred when ALTER TABLE adds a new GENERATED column to a tablewith existing rows, and during regular INSERT or UPDATE on aforeign table with GENERATED columns.Noted during investigation of a report from Vitaly Ustinov.Back-patch to v12 where GENERATED came in.Discussion:https://postgr.es/m/CAM_DEiWR2DPT6U4xb-Ehigozzd3n3G37ZB1+867zbsEVtYoJww@mail.gmail.com1 parent84f5c29 commit2b0ee12
File tree
4 files changed
+38
-17
lines changed- src
- backend
- commands
- executor
- test/regress
- expected
- sql
4 files changed
+38
-17
lines changedLines changed: 8 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5761 | 5761 |
| |
5762 | 5762 |
| |
5763 | 5763 |
| |
| 5764 | + | |
| 5765 | + | |
| 5766 | + | |
| 5767 | + | |
| 5768 | + | |
| 5769 | + | |
| 5770 | + | |
| 5771 | + | |
5764 | 5772 |
| |
5765 | 5773 |
| |
5766 | 5774 |
| |
| |||
5804 | 5812 |
| |
5805 | 5813 |
| |
5806 | 5814 |
| |
5807 |
| - | |
5808 |
| - | |
5809 |
| - | |
5810 |
| - | |
5811 |
| - | |
5812 | 5815 |
| |
5813 | 5816 |
| |
5814 | 5817 |
| |
|
Lines changed: 18 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
658 | 658 |
| |
659 | 659 |
| |
660 | 660 |
| |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
661 | 667 |
| |
662 | 668 |
| |
663 | 669 |
| |
| |||
729 | 735 |
| |
730 | 736 |
| |
731 | 737 |
| |
732 |
| - | |
| 738 | + | |
733 | 739 |
| |
734 | 740 |
| |
735 | 741 |
| |
| |||
738 | 744 |
| |
739 | 745 |
| |
740 | 746 |
| |
741 |
| - | |
742 |
| - | |
| 747 | + | |
| 748 | + | |
743 | 749 |
| |
744 | 750 |
| |
745 | 751 |
| |
| |||
1629 | 1635 |
| |
1630 | 1636 |
| |
1631 | 1637 |
| |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
1632 | 1644 |
| |
1633 | 1645 |
| |
1634 | 1646 |
| |
| |||
1651 | 1663 |
| |
1652 | 1664 |
| |
1653 | 1665 |
| |
1654 |
| - | |
| 1666 | + | |
1655 | 1667 |
| |
1656 | 1668 |
| |
1657 | 1669 |
| |
| |||
1662 | 1674 |
| |
1663 | 1675 |
| |
1664 | 1676 |
| |
1665 |
| - | |
1666 |
| - | |
| 1677 | + | |
| 1678 | + | |
1667 | 1679 |
| |
1668 | 1680 |
| |
1669 | 1681 |
| |
|
Lines changed: 8 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
| |||
455 | 456 |
| |
456 | 457 |
| |
457 | 458 |
| |
458 |
| - | |
| 459 | + | |
459 | 460 |
| |
460 | 461 |
| |
| 462 | + | |
| 463 | + | |
461 | 464 |
| |
462 |
| - | |
463 |
| - | |
464 |
| - | |
465 |
| - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
466 | 469 |
| |
467 | 470 |
| |
468 | 471 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
| |||
218 | 219 |
| |
219 | 220 |
| |
220 | 221 |
| |
221 |
| - | |
| 222 | + | |
222 | 223 |
| |
223 | 224 |
| |
| 225 | + | |
| 226 | + | |
224 | 227 |
| |
225 | 228 |
| |
226 | 229 |
| |
|
0 commit comments
Comments
(0)