]> granicus.if.org Git - postgresql/commit
Fast default trigger and expand_tuple fixes
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 24 Sep 2018 20:11:24 +0000 (16:11 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 24 Sep 2018 20:20:08 +0000 (16:20 -0400)
commit9625ab79245b5b91162ede9d1b4d8b4be823c21c
tree2b1d8eaf8fdda395fc085f7654eaab67c78aaf6a
parentbfdd02f88b9678dea0e0ba5866ee772f3aa55cba
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.
src/backend/access/common/heaptuple.c
src/backend/commands/trigger.c
src/test/regress/expected/fast_default.out
src/test/regress/sql/fast_default.sql