From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Wu, Fei" <wufei(dot)fnst(at)cn(dot)fujitsu(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Willing to fix a TODO case in libpq module |
Date: | 2019-03-16 17:43:09 |
Message-ID: | 31070.1552758189@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Wu, Fei" <wufei(dot)fnst(at)cn(dot)fujitsu(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2019-03-16 17:51:44 | Re: jsonpath |
Previous Message | Tom Lane | 2019-03-16 17:33:15 | Re: What is a savepointLevel ? |