Re: Allow disabling folding of unquoted identifiers to lowercase - Mailing list pgsql-general

From John R Pierce
Subject Re: Allow disabling folding of unquoted identifiers to lowercase
Date
Msg-id 8733c0e7-9b9a-5626-16ca-adf57c231a1f@hogranch.com
Whole thread Raw
In response to Re: Allow disabling folding of unquoted identifiers to lowercase  (John McKown <john.archie.mckown@gmail.com>)
Responses Re: Allow disabling folding of unquoted identifiers to lowercase
Re: Allow disabling folding of unquoted identifiers to lowercase
List pgsql-general
On 4/29/2016 12:56 PM, John McKown wrote:

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.

are those the APIs the parser uses?


-- 
john r pierce, recycling bits in santa cruz

pgsql-general by date:

Previous
From: John McKown
Date:
Subject: Re: Allow disabling folding of unquoted identifiers to lowercase
Next
From: John McKown
Date:
Subject: Re: Allow disabling folding of unquoted identifiers to lowercase