forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0d44460
committed
Use heap_modify_tuple not SPI_modifytuple in pl/perl triggers.
The code here would need some change anyway given planned change inSPI_modifytuple semantics, since this executes after we've exited theSPI environment. But really it's better to just use heap_modify_tuple.The code's actually shorter this way, and this avoids depending on somerather indirect reasoning about why the temporary arrays can't be overrun.(I think the old code is safe, as long as Perl hashes can't containduplicate keys; but with this way we don't need that assumption, onlythe assumption that SPI_fnumber doesn't return an out-of-range attnum.)While at it, normalize use of SPI_fnumber: make error messages distinguishno-such-column from can't-set-system-column, and remove test for deletedcolumn which is going to migrate into SPI_fnumber.1 parentf0e72a2 commit0d44460
1 file changed
+25
-31
lines changedLines changed: 25 additions & 31 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1670 | 1670 |
| |
1671 | 1671 |
| |
1672 | 1672 |
| |
1673 |
| - | |
1674 |
| - | |
| 1673 | + | |
1675 | 1674 |
| |
1676 | 1675 |
| |
1677 | 1676 |
| |
1678 | 1677 |
| |
1679 | 1678 |
| |
1680 | 1679 |
| |
1681 | 1680 |
| |
1682 |
| - | |
1683 |
| - | |
1684 |
| - | |
1685 |
| - | |
1686 |
| - | |
1687 | 1681 |
| |
1688 |
| - | |
1689 |
| - | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
1690 | 1686 |
| |
1691 | 1687 |
| |
1692 | 1688 |
| |
| |||
1699 | 1695 |
| |
1700 | 1696 |
| |
1701 | 1697 |
| |
1702 |
| - | |
1703 |
| - | |
1704 |
| - | |
1705 |
| - | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
1706 | 1704 |
| |
1707 | 1705 |
| |
1708 | 1706 |
| |
1709 | 1707 |
| |
1710 |
| - | |
1711 | 1708 |
| |
1712 | 1709 |
| |
1713 | 1710 |
| |
1714 | 1711 |
| |
1715 |
| - | |
| 1712 | + | |
1716 | 1713 |
| |
1717 | 1714 |
| |
1718 | 1715 |
| |
1719 | 1716 |
| |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
1720 | 1722 |
| |
1721 |
| - | |
| 1723 | + | |
1722 | 1724 |
| |
1723 | 1725 |
| |
1724 |
| - | |
1725 |
| - | |
1726 |
| - | |
1727 |
| - | |
1728 |
| - | |
1729 |
| - | |
1730 |
| - | |
1731 |
| - | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1732 | 1731 |
| |
1733 | 1732 |
| |
1734 | 1733 |
| |
1735 | 1734 |
| |
1736 | 1735 |
| |
1737 |
| - | |
1738 |
| - | |
| 1736 | + | |
1739 | 1737 |
| |
1740 |
| - | |
1741 | 1738 |
| |
1742 | 1739 |
| |
1743 |
| - | |
1744 |
| - | |
1745 |
| - | |
1746 |
| - | |
| 1740 | + | |
1747 | 1741 |
| |
1748 | 1742 |
| |
1749 | 1743 |
| |
|
0 commit comments
Comments
(0)