SPI_fnumber can't see oid - Mailing list pgsql-hackers

From admin
Subject SPI_fnumber can't see oid
Date
Msg-id Pine.BSF.4.10.10001132307050.75240-100000@server.b0x.com
Whole thread Raw
Responses Re: [HACKERS] SPI_fnumber can't see oid
List pgsql-hackers
It seems SPI_fnumber can't recognize oid as an attribute for a tuple
description. I performed my tests using contrib/spi/refint.c which uses
function to test the validity of the trigger for check_foreign_key() and
for check_primary_key(). I changed refint.c slightly to verify that
SPI_fnumber was really returning SPI_ERROR_NOATTRIBUTE and indeed it was.
Here's the exact line I got from the check_foreign_key trigger:

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?

Let me know what you think,
Marc



pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Re: [HACKERS] [hackers]development suggestion needed
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] [hackers]development suggestion needed