Thread: SELECTs return error with oid in WHERE clause
Ilya Goldberg (igg@mit.edu) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description SELECTs return error with oid in WHERE clause Long Description Create a table (FOO) insert a row, do a SELECT oid from FOO. Now do a SELECT FROM FOO WHERE OID=[whatever was returned inthe last command]. Result is an error: ERROR: getattproperties: no attribute tuple 29194 -2 The number after 'tuple' is table-specific rather than oid specific. In the example above, the OID was actually 29203. This occurs through psql, Pg.pm, and PsqlODBC. The latter essentially breaks the driver as used by Excel. PostgreSQL 7.0.2 on powerpc-unknown-linux-gnu, compiled by gcc 2.95.2 Sample Code A psql session: ome=# create table foo (bar integer); CREATE ome=# insert into foo values (123); INSERT 29203 1 ome=# select * from foo where oid=29203; ERROR: getattproperties: no attribute tuple 29194 -2 No file was uploaded with this report
pgsql-bugs@postgresql.org writes: > ERROR: getattproperties: no attribute tuple 29194 -2 > PostgreSQL 7.0.2 on powerpc-unknown-linux-gnu, compiled by gcc 2.95.2 Current releases don't really work at all on PPC unless compiled -O0. This is fixed for 7.1, but for now you gotta build that way. Someone seems to have stuck -O2 into the linux_ppc template since 7.0 release, which was a bad move. I'll fix the template for 7.0.3. regards, tom lane
I said: > Someone seems to have stuck -O2 into the linux_ppc template since > 7.0 release, which was a bad move. I'll fix the template for 7.0.3. No, I was misreading the CVS logs: the template in the REL7_0 branch does indeed say -O0. So AFAIK it should work, if the programs were built without overriding the template's CFLAGS setting. It wasn't clear from your last comment whether you built the programs yourself or used RPMs --- if RPMs, where did you get them from? regards, tom lane