X-Original-To: pgsql-odbc@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C6764475AE5 for ; Thu, 10 Apr 2003 00:59:20 -0400 (EDT) Received: from mail.bacchus.com.au (unknown [203.22.71.65]) by postgresql.org (Postfix) with ESMTP id D6179474E42 for ; Thu, 10 Apr 2003 00:59:18 -0400 (EDT) Received: from joe ([203.185.231.74]) by mail.bacchus.com.au (8.12.8/8.12.8) with SMTP id h3A4xHdv022362 for ; Thu, 10 Apr 2003 14:59:17 +1000 Message-Id: <200304100459.h3A4xHdv022362@mail.bacchus.com.au> Date: Thu, 10 Apr 2003 14:57:28 +1000 To: From: "Wayne Armstrong" Reply-To: "Wayne Armstrong" Subject: Parse statement can fail for unquoted uppercase tablenames MIME-Version: 1.0 X-Mailer: The Polarbar Mailer; version=1.25a; build=1965 X-Spam-Status: No, hits=-6.6 required=5.0 tests=BAYES_01 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/27 X-Sequence-Number: 2829 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