Re: [HACKERS] Problem with foreign keys and inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Problem with foreign keys and inheritance
Date: 2000-01-16 18:10:41
Message-ID: 21031.948046241@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Oliver Elphick" <olly(at)lfix(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ansley, Michael 2000-01-16 20:07:37 RE: [HACKERS] pg_dump not in very good shape
Previous Message Peter Eisentraut 2000-01-16 17:18:31 Re: [HACKERS] TODO list