From: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
---|---|
To: | John R Pierce <pierce(at)hogranch(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Allow disabling folding of unquoted identifiers to lowercase |
Date: | 2016-04-29 19:56:04 |
Message-ID: | CAAJSdjhbcZfA1Qt9OZB+X_jVEGL5SgYvT=kH0KQRuSweiYNANg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Apr 29, 2016 at 2:44 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> On 4/29/2016 10:21 AM, Evgeny Morozov wrote:
>
> It would be great if Postgres had a server setting that allowed the
> automatic folding of identifiers to lowercase to be disabled, so that camel
> case identifiers could be used without having to quote every single
> identifier, i.e.
>
> SELECT MyColumn FROM MyTable ORDER BY MyColumn
>
> instead of
>
> SELECT "MyColumn" FROM "MyTable" ORDER BY "MyColumn"
>
> I suspect this would be painful for the parser, unless you also enforced
> that all SQL keywords were in a specific case (all lower would be the
> minimal impact to the code). otherwise the parser would have to lower()
> every token to check to see if its a keyword, but if not, revert it to its
> original case.
>
Why? PostgreSQL is written in C. So use strncasecmp() instead of strncmp()
or strcasecmp() instead of strcmp() to test for a token.
> --
> john r pierce, recycling bits in santa cruz
>
>
--
The unfacts, did we have them, are too imprecisely few to warrant our
certitude.
Maranatha! <><
John McKown
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2016-04-29 20:38:22 | Re: Allow disabling folding of unquoted identifiers to lowercase |
Previous Message | Ciprian Grigoras | 2016-04-29 19:51:00 | Re: Postgres processes getting stuck (bug?) |