Re: ColumnName and ColumnNumber in libpq (C interface) - Mailing list pgsql-interfaces

From Alberto Cabello Sanchez
Subject Re: ColumnName and ColumnNumber in libpq (C interface)
Date
Msg-id 20030917062912.GA5432@guadiana.unex.es
Whole thread Raw
In response to Re: ColumnName and ColumnNumber in libpq (C interface)  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@unex.es
Servicio de Informática
924 289 351
-----------------------


pgsql-interfaces by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: Trigger updates MS SQL table
Next
From: khalil El Mazouari
Date:
Subject: Re: [JDBC] Connection refused. HELP ME!!!!