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

RE: [INTERFACES] ODBC: OID column in views

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Byron Nikolaidis'" <byronn(at)solipsys(dot)com>
Cc: "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: [INTERFACES] ODBC: OID column in views
Date: 1999-06-29 15:05:00
Message-ID: B9FE686F5C26D311AC22006097BCD3D65EFE@woody.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces

> -----Original Message-----
> From: owner-pgsql-interfaces(at)postgreSQL(dot)org
> [mailto:owner-pgsql-interfaces(at)postgreSQL(dot)org]On Behalf Of Byron
> Nikolaidis
> Sent: 29 June 1999 14:02
> To: Dave Page
> Cc: 'pgsql-interfaces(at)postgresql(dot)org'
> Subject: Re: [INTERFACES] ODBC: OID column in views
> 
> 
> 
> 
> Dave Page wrote:
> 
> > I've recently come across a couple of minor problems(?) in 
> the ODBC driver:
> >
> > 1) When querying a view eg:
> >
> > SELECT * FROM pg_tables;
> >
> > the driver will always attempt (and fail) to retrieve the 
> oid column thus
> > returning an ODBC call failed error. This occurs whether 
> the 'Show OID
> > Column' is selected or not. I can see the obvious overhead 
> in checking
> > whether or not a query is on a view or table - is the 
> current behaviour the
> > best solution or is there another way around this (other 
> than specifying
> > column names in queries)?
> >
> 
> I'm not sure what you mean by "the driver will always attempt 
> to retrieve the oid
> column"...  What is the driver doing?  If it is sending 
> another query, could you show
> me exactly what because its been a while since I looked at the code.

The commlog shows the following when the query 'SELECT * FROM pg_tables;' is
executed via DAO (I've just thought though, would it be the driver or
perhaps DAO that is expanding the wildcard?):

conn=175915324, query='SELECT "oid" ,"tablename" ,"tableowner" ,"hasindexes"
,"hasrules" ,"hastriggers"  FROM "pg_tables" '
ERROR from backend during send_query: 'ERROR:  system column oid not
available - pg_tables is a view'
STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while
executing the query'

Presumably if it's DAO that's expanding the wildcard, it would still be the
driver reporting the existance of the oid column?

Regards,
     
Dave.

Responses

pgsql-interfaces by date

Next:From: Byron NikolaidisDate: 1999-06-29 16:41:23
Subject: Re: [INTERFACES] ODBC: OID column in views
Previous:From: Stan BrownDate: 1999-06-29 14:35:23
Subject: ODBC info?

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