pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Pass correct TupDesc to ri_NullCheck() in Assert
Date: Tue, 03 Apr 2018 21:05:09 +0000
Message-ID: <E1f3T77-0006tF-RV@gemulon.postgresql.org> (raw)

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/20180403204723.fqte755nukgm42uf@alvherre.pgsql

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(-)



Message-ID: <E1f3T77-0006tF-RV@gemulon.postgresql.org>
Permalink:  ../E1f3T77-0006tF-RV@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f3T77-0006tF-RV@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Pass correct TupDesc to ri_NullCheck() in Assert
  In-Reply-To: <E1f3T77-0006tF-RV@gemulon.postgresql.org>
  References: <E1f3T77-0006tF-RV@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox