Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5B2L-0006gc-41 for pgsql-general@arkaria.postgresql.org; Sat, 16 Mar 2019 15:15:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5B2I-0005pt-PN for pgsql-general@arkaria.postgresql.org; Sat, 16 Mar 2019 15:15:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5B2I-0005p0-9j for pgsql-general@lists.postgresql.org; Sat, 16 Mar 2019 15:15:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5B2B-0007Kt-9x for pgsql-general@postgresql.org; Sat, 16 Mar 2019 15:15:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2GFFa5R015440; Sat, 16 Mar 2019 11:15:36 -0400 From: Tom Lane To: Steve Haresnape cc: pgsql-general@postgresql.org Subject: Re: Fwd: Camel case identifiers and folding In-reply-to: References: Comments: In-reply-to Steve Haresnape message dated "Sat, 16 Mar 2019 21:53:33 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15438.1552749336.1@sss.pgh.pa.us> Date: Sat, 16 Mar 2019 11:15:36 -0400 Message-ID: <15439.1552749336@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Steve Haresnape writes: > As I said, I don't want to quote my identifiers. I know what that does. I > want to specify them in a certain way, see them in that same way, but refer > to them in any old way. > You can call it normalize or fold or whatever. It's a bad design choice, > and not even a completely compliant choice. > Is a cure contemplated? I know it's not just me that dislikes this. No. There have been previous discussions of allowing variant case-folding rules, and the conclusion has always been that it would break so much stuff as to be entirely not worth the trouble. The big problem with making significant semantics changes like this be optional is that authors of general-purpose tools then have to be prepared to cope with all the possibilities. That's a pretty enormous cost to load onto other people. If it *only* affected the core code, maybe you could find somebody to do the work and call it done, but actually the implications would reverberate across the entire Postgres ecosystem. That's a tough call to make for a change that can't even be painted as meeting a widely-favored goal like better SQL spec compliance. Now, in the spirit of full disclosure, I should say that the only form of this idea that people have really spent significant effort looking at is exactly the fully-SQL-spec-compliant case-folding rule, ie just like Postgres normally does it except unquoted identifiers fold to all-upper-case not all-lower. Perhaps there's some reason why what you want would be less painful than that turns out to be ... but I'm not seeing such a reason offhand. In fact I suspect your preference is actually worse, it'd require behavior changes in more places. As an example, I believe your request would require case-insensitive uniqueness enforcement in the system catalogs' unique indexes on names. You have no idea how large a can of worms that opens (but I'll just mention that "which characters are letters" doesn't even have a well defined universal answer). regards, tom lane