Skip site navigation (1) Skip section navigation (2)

Re: ColumnName and ColumnNumber in libpq (C interface)

From: Alberto Cabello Sanchez <alberto(at)unex(dot)es>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ColumnName and ColumnNumber in libpq (C interface)
Date: 2003-09-17 06:29:12
Message-ID: 20030917062912.GA5432@guadiana.unex.es (view raw or flat)
Thread:
Lists: pgsql-interfaces
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(at)unex(dot)es
Servicio de Informática
924 289 351
-----------------------

In response to

pgsql-interfaces by date

Next:From: Luca MoscatelliDate: 2003-09-17 09:02:24
Subject: Re: Connection refused. HELP ME!!!!
Previous:From: Kris JurkaDate: 2003-09-16 23:17:43
Subject: Re: observations about temporary tables and schemas

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group