Pass correct TupDesc to ri_NullCheck() in Assert Previous coding was passing the wrong table's tuple descriptor, which accidentally fails to fail because no existing test case exercises a foreign key in which the referenced attributes are further to the right of the referencing attributes.
Add a test so that further breakage is visible. This got broken in 16828d5c0273. Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cd5005bc12d0f9a15fe7dddd3e1ac92496608114 Modified Files -------------- src/backend/utils/adt/ri_triggers.c | 2 +- src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 10 ++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-)
