X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1E09DD1B4E2 for ; Sun, 5 Oct 2003 19:42:06 +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 96894-06 for ; Sun, 5 Oct 2003 16:41:20 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 31049D1B4FB for ; Sun, 5 Oct 2003 16:41:18 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h95JfFd26212; Sun, 5 Oct 2003 15:41:15 -0400 (EDT) From: Bruce Momjian Message-Id: <200310051941.h95JfFd26212@candle.pha.pa.us> Subject: Re: PQfnumber and quoted identifiers In-Reply-To: <8636.1065378408@sss.pgh.pa.us> To: Tom Lane Date: Sun, 5 Oct 2003 15:41:15 -0400 (EDT) Cc: Peter Eisentraut , PostgreSQL Development X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/258 X-Sequence-Number: 44940 Tom Lane wrote: > Bruce Momjian writes: > > Peter Eisentraut wrote: > >> Since this behavior was undocumented and no one had noticed it in the last > >> 10 years, I think we can away with removing it. > > > I agree. I would never expect to add quotes to a C string to preserve > > case (outside SQL), and the fact that PQfname doesn't return the string > > in quotes is another inconsistency. > > Actually I was planning to quiz you about the history. I can see from > the CVS logs that you installed all the patches that added the > quoting/downcasing behavior. Was there any discussion about it? > I dug through the mail archives and found > > http://archives.postgresql.org/pgsql-ports/1997-05/msg00081.php > http://archives.postgresql.org/pgsql-bugs/1997-05/msg00023.php > http://archives.postgresql.org/pgsql-hackers/1997-11/msg00170.php > > but I could not find any actual discussion about whether there was a > real bug or whether the complainants should be told to fix their code. Wow, 1997 --- seems like a time long ago. As I remember, I crudely coded up a fix for the complaint --- that's the way we did it back then. :-) There probably wasn't a lot of discussion, if any --- people complained, and we coded to fix the complaint. In hindsight, I should have told them the API was working properly, but the idea of telling a user they were wrong wasn't something we did back then --- we needed every user we could get. My guess is that the email reports from May, 1997 were in my mailbox, and in Novemeber I saw it again (I was a volunteer then) and I coded up the fix, posted it to the lists, then applied it. No one said anything about it, so it stayed in. Strange no one complained about it until now. I suppose that is because few folks use that function _and_ upper-case identifiers, as you mentioned. We could code the proper behavior, post a mention on general, and document it in the release notes, or wait for 7.5, or do nothing. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073