Thread

  1. OID in WHERE clause of SELECT results in error

    Ilya Goldberg <igg@mit.edu> — 2000-10-17T16:00:27Z

    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.
    
    
  2. Re: OID in WHERE clause of SELECT results in error

    Lamar Owen <lamar.owen@wgcr.org> — 2000-10-18T15:47:55Z

    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