From: Wayne Armstrong <wdarmst@bacchus.com.au>
To: pgsql-odbc@postgresql.org
Subject: Parse statement can fail for unquoted uppercase tablenames
Date: Thu, 10 Apr 2003 14:57:28 +1000
Message-ID: <200304100459.h3A4xHdv022362@mail.bacchus.com.au> (raw)
Hi,
If I pass the odbc driver a statement that looks like :-
select * from CALEND_EVENT
and statement parsing is turned on it may fail if it tries to do a
PGAPI_Columns call using the following SQL:-
select u.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum,
a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind from pg_namespace
u, pg_class c, pg_attribute a, pg_type t where u.oid = c.relnamespace and (not
a.attisdropped) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0)
and c.relname = 'CALEND_EVENT' and u.nspname = 'bacchus' order by u.nspname,
c.relname, attnum.
select * from calend_event
works fine.
So even though the tablename is not quoted (and thus should be folded to
lowercase), the statement may return no rows, cause the columncount returned
from the statement parsing is 0.
Regards,
Wayne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: wdarmst@bacchus.com.au
Subject: Re: Parse statement can fail for unquoted uppercase tablenames
In-Reply-To: <200304100459.h3A4xHdv022362@mail.bacchus.com.au>
References: <200304100459.h3A4xHdv022362@mail.bacchus.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox