agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add test case for same-type reordered FK columns
Date: Fri, 10 Apr 2026 09:12:37 +0000
Message-ID: <E1wB7un-000HHt-0T@gemulon.postgresql.org> (raw)

Add test case for same-type reordered FK columns

The test added in 980c1a85d819 covered reordered FK columns with
different types, which triggered an "operator not a member of opfamily"
error in the fast-path prior to that commit.  Add a test for the
same-type case, which is also fixed by that commit but where the wrong
scan key ordering instead produced a spurious FK violation without any
internal error.

Reported-by: Fredrik Widlert <fredrik.widlert@digpro.se>
Discussion: https://postgr.es/m/CADfhSr8hYc-4Cz7vfXH_oV-Jq81pyK9W4phLrOGspovsg2W7Kw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/009ea1b08d7b8843435bd0f1137fa3df09aac79f

Modified Files
--------------
src/test/regress/expected/foreign_key.out | 10 ++++++++++
src/test/regress/sql/foreign_key.sql      |  9 +++++++++
2 files changed, 19 insertions(+)



Message-ID: <E1wB7un-000HHt-0T@gemulon.postgresql.org>
Permalink:  ../E1wB7un-000HHt-0T@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wB7un-000HHt-0T@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add test case for same-type reordered FK columns
  In-Reply-To: <E1wB7un-000HHt-0T@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox