Skip site navigation (1) Skip section navigation (2)

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@[] (view raw, whole thread or download thread mbox)
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);
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,, 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.


pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group