Re: [HACKERS] Problem with foreign keys and inheritance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Problem with foreign keys and inheritance
Date
Msg-id 21031.948046241@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Problem with foreign keys and inheritance  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
"Oliver Elphick" <olly@lfix.co.uk> writes:
>> [Version: CVS as of yesterday]
>> When I create a table that inherits from another table that uses foreign
>> keys, I get something like this:
>> 
>> ERROR:  cache lookup of attribute 10 in relation 124171 failed

Ah, I see it.  It's got nothing to do with foreign keys, just inherited
constraints.  We're trying to deparse the inherited constraint
expressions at a time that the relation-in-process-of-being-created
isn't yet officially visible.  So trying to look up its attributes is
failing.  Need another CommandCounterIncrement() in there to make it
work.

This must have been busted for a good while, I think.  I rewrote that
module months ago and probably broke it then.  Probably should add
a regress test case that uses inherited constraints...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] TODO list
Next
From: "Ansley, Michael"
Date:
Subject: RE: [HACKERS] pg_dump not in very good shape