Re: PostgreSQL Gotchas - Mailing list pgsql-general

From Tom Lane
Subject Re: PostgreSQL Gotchas
Date
Msg-id 9170.1129485726@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL Gotchas  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Peter Eisentraut <peter_e@gmx.net> writes:
> I guess you could get around that if you leave the case-folding in the
> lexer as is but instead make the nameeq function case insensitive.

If you do that then you have to nail down the behavior at initdb time
(else flipping the switch will corrupt all your system catalog indexes).

To be selective about which occurrences of identifiers get smashed to
lower, I think we would have to postpone the smashing into analyze.c.
This would be a lot messier than doing it once in the lexer --- but on
the other hand, it would avoid violating the rule stated in gram.y,
namely that lexer and grammar behavior must not vary depending on GUC
variable settings.  On the third hand, we could get around that
restriction by not allowing the GUC variable to change within a session,
which might be a good idea anyway to avoid confusing applications.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL Gotchas
Next
From: Chris Travers
Date:
Subject: Re: PostgreSQL Gotchas