OID in WHERE clause of SELECT results in error

From: Ilya Goldberg <igg(at)mit(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: OID in WHERE clause of SELECT results in error
Date: 2000-10-17 16:00:27
Message-ID: p04320400b61223d080d9@[192.168.0.2]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

For some strange reason, using an OID in a WHERE clause no longer
works in 7.0.2. It did in 6.5.3 Here is an example psql session:

ome=# create table foo (bar integer);
CREATE
ome=# insert into foo values (123);
INSERT 29225 1
ome=# select bar from foo where oid=29225;
ERROR: getattproperties: no attribute tuple 29216 -2
ome=# select oid,bar from foo;
oid | bar
-------+-----
29225 | 123
(1 row)

This is broken in psql, Pg.pm, and PsqlODBC. The error in the ODBC
driver essentially breaks Excel/MS Query access to PostgreSQL. It is
possible to bypass the error by issuing a select statement directly
from MS Query - the GUI tool from Excel no longer works, though.
This is a long-winded way of saying that PsqlODBC actually works with
7.0.2 - except for this error.

The number after the tuple in the error seems to be table-specific -
it remains the same whatever oid you are querying - even a
non-existing one.

I submitted a bug report to the database also - wasn't sure of the
preferred method. Sorry if you are getting a duplicate.

PostgreSQL 7.0.2 on powerpc-unknown-linux-gnu, compiled by gcc 2.95.2
Installed via RPMs from your FTP site.

-Ilya Goldberg.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-10-17 16:07:02 Re: The Data Base System is in recovery mode
Previous Message pgsql-bugs 2000-10-17 15:32:43 SELECTs return error with oid in WHERE clause