ALTER TABLE ONLY ...DROP CONSTRAINT is broken in HEAD. - Mailing list pgsql-hackers

From Alexey Klyukin
Subject ALTER TABLE ONLY ...DROP CONSTRAINT is broken in HEAD.
Date
Msg-id 5BC7F4FA-62EA-437E-B341-A4B01B722BAD@commandprompt.com
Whole thread Raw
Responses Re: ALTER TABLE ONLY ...DROP CONSTRAINT is broken in HEAD.
List pgsql-hackers
This works in 9.1, but not in HEAD:

CREATE TABLE parent(id INTEGER, CONSTRAINT id_check CHECK(id>1));
CREATE TABLE child() INHERITS(parent);

ALTER TABLE ONLY parent DROP CONSTRAINT id_check;

I'm getting:
ERROR:  relation 16456 has non-inherited constraint "id_check"
where 16456 is the oid of the child table.

It seems that the pg_constraint scan at ATExecDropConstraint (tablecmds.c:6751) is re-reading those tuples that were
updatedin the previous iterations of this scan, at least that's what I've observed in gdb. I'm not sure how to fix this
yet.

--
Alexey Klyukin        http://www.commandprompt.com
The PostgreSQL Company – Command Prompt, Inc.






pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Alpha 1 for 9.2
Next
From: Robert Haas
Date:
Subject: Re: cheaper snapshots redux