Parse statement can fail for unquoted uppercase tablenames

Поиск
Список
Период
Сортировка
От Wayne Armstrong
Тема Parse statement can fail for unquoted uppercase tablenames
Дата
Msg-id 200304100459.h3A4xHdv022362@mail.bacchus.com.au
обсуждение исходный текст
Ответы Re: Parse statement can fail for unquoted uppercase tablenames  ("Wayne Armstrong" <wdarmst@bacchus.com.au>)
Список 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


В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Daniel F Garcia"
Дата:
Сообщение: Connection to posgresql database works under windows scripting host but not IIS/ASP
Следующее
От: "Wayne Armstrong"
Дата:
Сообщение: Re: Parse statement can fail for unquoted uppercase tablenames