pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Haresnape <s.haresnape@creativeintegrity.co.nz>
Cc: pgsql-general@postgresql.org
Subject: Re: Fwd: Camel case identifiers and folding
Date: Sat, 16 Mar 2019 11:15:36 -0400
Message-ID: <15439.1552749336@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJrKPxd+yxM=oBtECaHpm7zrjCutQ23THV7aHOJ8LbyONJiJqQ@mail.gmail.com>
References: <CAJrKPxc69dMNJAE=3Y5mG56sXwQLRqXZnN4inZQ3EXdwZFqH2Q@mail.gmail.com>
	<CAKFQuwaBpYUPng4O=Q3ge3KUytsrt+VYb4u8J-C8dd9dum9Ehw@mail.gmail.com>
	<CAJrKPxfek1GNcvsxdU=HFY1AzN1ZOPweMzurjtNtmx_83C6pEQ@mail.gmail.com>
	<CAJrKPxd+yxM=oBtECaHpm7zrjCutQ23THV7aHOJ8LbyONJiJqQ@mail.gmail.com>

Steve Haresnape <s.haresnape@creativeintegrity.co.nz> 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




view thread (20+ messages)  latest in thread

Message-ID: <15439.1552749336@sss.pgh.pa.us>
Permalink:  ../15439.1552749336@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15439.1552749336@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, s.haresnape@creativeintegrity.co.nz
  Subject: Re: Fwd: Camel case identifiers and folding
  In-Reply-To: <15439.1552749336@sss.pgh.pa.us>
  References: <CAJrKPxc69dMNJAE=3Y5mG56sXwQLRqXZnN4inZQ3EXdwZFqH2Q@mail.gmail.com> <CAKFQuwaBpYUPng4O=Q3ge3KUytsrt+VYb4u8J-C8dd9dum9Ehw@mail.gmail.com> <CAJrKPxfek1GNcvsxdU=HFY1AzN1ZOPweMzurjtNtmx_83C6pEQ@mail.gmail.com> <CAJrKPxd+yxM=oBtECaHpm7zrjCutQ23THV7aHOJ8LbyONJiJqQ@mail.gmail.com> <15439.1552749336@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox