Fast default trigger and expand_tuple fixes
Andrew Dunstan <andrew@dunslane.net>
Fast default trigger and expand_tuple fixes Ensure that triggers get properly filled in tuples for the OLD value. Also fix the logic of detecting missing null values. The previous logic failed to detect a missing null column before the first missing column with a default. Fixing this has simplified the logic a bit. Regression tests are added to test changes. This should ensure better coverage of expand_tuple(). Original bug reports, and some code and test scripts from Tomas Vondra Backpatch to release 11.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/heaptuple.c | modified | +21 −30 |
| src/backend/commands/trigger.c | modified | +4 −1 |
| src/test/regress/expected/fast_default.out | modified | +190 −1 |
| src/test/regress/sql/fast_default.sql | modified | +113 −1 |