"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