pgsql: Add missing CommandCounterIncrement

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add missing CommandCounterIncrement
Date: 2025-01-26 16:38:19
Message-ID: E1tc5eN-003gLV-5n@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add missing CommandCounterIncrement

For commit b663b9436e75 I thought this was useless, but turns out not to
be for the case where a partitioned table has two identical foreign key
constraints which can both be matched by the same constraint in a
partition during attach. This CCI makes the match search for the second
constraint in the parent ignore the constraint in the child that has
already been matched by the first constraint in the parent.

Reported-by: Alexander Lakhin <exclusion(at)gmail(dot)com>
Discussion: https://postgr.es/m/c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0a16c8326c5a14abd180eeefe5e5ee4263513c2a

Modified Files
--------------
src/backend/commands/tablecmds.c | 20 ++++++++++----------
src/test/regress/expected/foreign_key.out | 10 ++++++++++
src/test/regress/sql/foreign_key.sql | 11 +++++++++++
3 files changed, 31 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2025-01-26 17:43:52 pgsql: Test postmaster with program_options_handling_ok() et al.
Previous Message Noah Misch 2025-01-25 19:29:54 pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull