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 DE865D1B501 for ; Wed, 17 Sep 2003 06:29:55 +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 39801-09 for ; Wed, 17 Sep 2003 03:29:23 -0300 (ADT) Received: from guadiana.unex.es (guadiana.unex.es [158.49.17.23]) by svr1.postgresql.org (Postfix) with ESMTP id CE6F3D1B4E1 for ; Wed, 17 Sep 2003 03:29:16 -0300 (ADT) Received: from alberto by guadiana.unex.es with local (Exim 3.35 #1 (Debian)) id 19zVoO-0001mJ-00; Wed, 17 Sep 2003 08:29:12 +0200 Date: Wed, 17 Sep 2003 08:29:12 +0200 To: Tom Lane , pgsql-interfaces@postgresql.org Subject: Re: ColumnName and ColumnNumber in libpq (C interface) Message-ID: <20030917062912.GA5432@guadiana.unex.es> References: <3F65715A.BDCAD1FB@rodos.fzk.de> <10317.1063637327@sss.pgh.pa.us> <20030916075640.GA10965@guadiana.unex.es> <16696.1063719986@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <16696.1063719986@sss.pgh.pa.us> User-Agent: Mutt/1.3.28i From: Alberto Cabello Sanchez X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/38 X-Sequence-Number: 4456 On Tue, Sep 16, 2003 at 09:46:26AM -0400, Tom Lane wrote: > I don't really want to change PQfname; that would probably break more > apps than changing PQfnumber. > > We could achieve the property you suggest if we forgot about > case-insensitive matching and dequoting, and simply made PQfnumber check > for an exact match. ...but this is also app breaker. > > Or we could try some combination behavior (say, try exact match, then > if no luck apply the dequote/downcase logic). This might offer better > backwards compatibility, but the more complex the behavior, the more > potential for surprising corner cases ... > What about a PQfrealname function (actually, a macro) which returns quoted string? I hope this suggestion is not too stupid. -- ----------------------- Alberto Cabello Sánchez alberto@unex.es Servicio de Informática 924 289 351 -----------------------