pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Parse statement can fail for unquoted uppercase tablenames
3+ messages / 2 participants
[nested] [flat]

* Parse statement can fail for unquoted uppercase tablenames
@ 2003-04-10 04:57  Wayne Armstrong <wdarmst@bacchus.com.au>
  0 siblings, 1 reply; 3+ messages in thread

From: Wayne Armstrong @ 2003-04-10 04:57 UTC (permalink / raw)
  To: pgsql-odbc

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Parse statement can fail for unquoted uppercase tablenames
@ 2003-04-10 06:02  Wayne Armstrong <wdarmst@bacchus.com.au>
  parent: Wayne Armstrong <wdarmst@bacchus.com.au>
  0 siblings, 1 reply; 3+ messages in thread

From: Wayne Armstrong @ 2003-04-10 06:02 UTC (permalink / raw)
  To: pgsql-odbc

** Reply to message from "Wayne Armstrong" <wdarmst@bacchus.com.au> on Thu, 10
Apr 2003 14:57:28 +1000

Umm,
 This actually seems to happen when the tablename is qualified ie:-
 select * from BACCHUS.CALEND_EVENT WHERE ....
 The qualifier gets lowercased as it should, the tablename does not.


Regards,
Wayne

> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Parse statement can fail for unquoted uppercase tablenames
@ 2003-04-12 04:22  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Wayne Armstrong <wdarmst@bacchus.com.au>
  0 siblings, 0 replies; 3+ messages in thread

From: Hiroshi Inoue @ 2003-04-12 04:22 UTC (permalink / raw)
  To: 'Wayne Armstrong' <wdarmst@bacchus.com.au>; +Cc: pgsql-odbc

> -----Original Message-----
> From: Wayne Armstrong
> 
> ** Reply to message from "Wayne Armstrong" 
> <wdarmst@bacchus.com.au> on Thu, 10
> Apr 2003 14:57:28 +1000
> 
> Umm,
>  This actually seems to happen when the tablename is qualified ie:-
>  select * from BACCHUS.CALEND_EVENT WHERE ....
>  The qualifier gets lowercased as it should, the tablename does not.

Could you try the lastest snapshot dll at
http://www.geocities.jp/inocchichichi/psqlodbc/ .

regards,
Hiroshi Inoue




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-04-12 04:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-10 04:57 Parse statement can fail for unquoted uppercase tablenames Wayne Armstrong <wdarmst@bacchus.com.au>
2003-04-10 06:02 ` Wayne Armstrong <wdarmst@bacchus.com.au>
2003-04-12 04:22   ` Hiroshi Inoue <inoue@tpf.co.jp>

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