X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 2EA65D1B500 for ; Tue, 16 Sep 2003 07:52:32 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 41468-06 for ; Tue, 16 Sep 2003 04:52:02 -0300 (ADT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by svr1.postgresql.org (Postfix) with SMTP id 154CAD1B509 for ; Tue, 16 Sep 2003 04:51:59 -0300 (ADT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Tue Sep 16 09:51:59 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id JAA24580 for ; Tue, 16 Sep 2003 09:51:59 +0200 (METDST) Message-ID: <3F66C11E.AE5B7B97@rodos.fzk.de> Date: Tue, 16 Sep 2003 09:51:59 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: ColumnName and ColumnNumber in libpq (C interface) Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char 9C hex) in message header 'Received' Received: \234by rodos.fzk.de... ^ X-Archive-Number: 200309/32 X-Sequence-Number: 4450 > > Christoph Haller writes: > >> I thougth running this helloworldish C program: > >> should print > >> Bar > >> 0 > >> > >> but stdout shows > >> Bar > >> -1 > >> > > > All names are folded to lowercase, except enclosed in double quotes. So > > printf("%d\n",PQfnumber(res,"\"Bar\"")); > > gives you the right result. > > I wonder whether this behavior is appropriate for PQfnumber, though. > It's never been documented ... and certainly should be if we decide > we should keep it. Comments? > > regards, tom lane > I'd say it should be left as it is, and documented of course. I can see a possible ambiguity, if someone is queer enough to define columns like "bar", "Bar", "BAR", etc. within the same table. Regards, Christoph