PQfnumber and quoted identifiers

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: PQfnumber and quoted identifiers
Date: 2003-10-05 14:37:29
Message-ID: Pine.LNX.4.44.0310051632370.2745-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

There was a discussion on -interfaces that might need more consideration.

http://archives.postgresql.org/pgsql-interfaces/2003-09/msg00026.php

Apparently, it has so far been an undocumented feature of libpq's function
PGfnumber (return column number from column name) that the column name
needs to be double-quoted if it contains upper-case letters. That, is you
need to write

PQfnumber(res, "\"Bar\"")

I think this is completely bizarre and pointless. This is a C interface
and not SQL. Other libpq functions that accept names of SQL objects don't
do this. Also, PQfname and PQfnumber ought to be inverses.

Since this behavior was undocumented and no one had noticed it in the last
10 years, I think we can away with removing it.

--
Peter Eisentraut peter_e(at)gmx(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2003-10-05 15:11:20 Re: PQfnumber and quoted identifiers
Previous Message Bruce Momjian 2003-10-05 14:32:14 Re: pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...

Browse pgsql-interfaces by date

  From Date Subject
Next Message Andreas Pflug 2003-10-05 15:11:20 Re: PQfnumber and quoted identifiers
Previous Message Peter Eisentraut 2003-10-04 18:26:06 Re: KDevelop Compiler Options ?