Re: Willing to fix a TODO case in libpq module - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Willing to fix a TODO case in libpq module
Date
Msg-id 31070.1552758189@sss.pgh.pa.us
Whole thread Raw
In response to Willing to fix a TODO case in libpq module  ("Wu, Fei" <wufei.fnst@cn.fujitsu.com>)
List pgsql-hackers
"Wu, Fei" <wufei.fnst@cn.fujitsu.com> writes:
> On website: https://wiki.postgresql.org/wiki/Todo#libpq
> I found that in libpq module,there is a todo case:
> -------------------------------------------------------------------------------
> Prevent PQfnumber() from lowercasing unquoted column names
> PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it

> -------------------------------------------------------------------------------
> I am interested in this one. So ,Had it be fixed?

Hmm, I think this item might be obsolete.  The existing definition that
PQfnumber performs quote-stripping and down-casing is a bit overcomplicated,
but it's not impossible to work with.  It's pretty hard to call it a bug,
so I don't think we'd consider actually changing the function's behavior.

Maybe there's room for a second function with a different name that
just looks for an exact match to the input string.  But I've heard
few if any requests for that.  The use-case for PQfnumber is pretty
narrow to begin with --- I suspect most apps just hard-wire the expected
column number --- so the demand for a marginally-more-efficient version
would be even narrower.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: What is a savepointLevel ?
Next
From: Jeff Janes
Date:
Subject: Re: jsonpath