Skip site navigation (1) Skip section navigation (2)

pgsql: Fix an ancient oversight in change_varattnos_of_a_node: it

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix an ancient oversight in change_varattnos_of_a_node: it
Date: 2008-05-09 22:38:05
Message-ID: 20080509223806.0090C7559EA@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix an ancient oversight in change_varattnos_of_a_node: it neglected to update
varoattno along with varattno.  This resulted in having Vars that were not
seen as equal(), causing inheritance of the "same" constraint from different
parent relations to fail.  An example is

create table pp1 (f1 int check (f1>0));
create table cc1 (f2 text, f3 int) inherits (pp1);
create table cc2(f4 float) inherits(pp1,cc1);

Backpatch as far as 7.4.  (The test case still fails in 7.4, for reasons
that I don't feel like investigating at the moment.)

This is a backpatch commit only.  The fix will be applied in HEAD as part
of the upcoming pg_constraint patch.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        tablecmds.c (r1.91.2.2 -> r1.91.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.91.2.2&r2=1.91.2.3)

pgsql-committers by date

Next:From: Tom LaneDate: 2008-05-09 23:32:05
Subject: pgsql: Change the rules for inherited CHECK constraints to be
Previous:From: Tom LaneDate: 2008-05-09 22:37:56
Subject: pgsql: Fix an ancient oversight in change_varattnos_of_a_node: it

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group