Thread: OID in WHERE clause of SELECT results in error

OID in WHERE clause of SELECT results in error

From
Ilya Goldberg
Date:
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.

Re: OID in WHERE clause of SELECT results in error

From
Lamar Owen
Date:
Ilya Goldberg wrote:
> 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:

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

Sounds like the optimization problem we have had for the PPC RPM's.  I'm
pulling those until we can get that worked out.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11