admin <admin@wtbwts.com> writes:
> ERROR: check_foreign_key: there is no attribute oid in relation product
> Looking at src/backend/executor/spi.c, I noticed SPI_fnumber started
> counting at 0. Is this normal or should it be -1, assuming oid might be
> just before 0?
I think the SPI code is deliberately set up to prevent access to
the system attributes. Jan Wieck is probably the only one who knows
exactly why, but I'll bet that something will break if you bypass
that restriction :-(
regards, tom lane