Re: hint infrastructure setup (v3)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: hint infrastructure setup (v3)
Дата
Msg-id 13372.1081186626@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: hint infrastructure setup (v3)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: hint infrastructure setup (v3)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-patches
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> If you can think of a reasonable way to stop treating them as separate
>> tokens inside the grammar without altering the user-visible behavior,
>> I'm certainly interested.

> I join a small proof-of-concept patch to drop some tokens out of the
> parser.

I believe these were treated this way *specifically* because of the
keyword-is-not-an-identifier issue.  SQL99 calls out most of these
as being keywords:

         SQL defines predefined data types named by the following <key
         word>s: CHARACTER, CHARACTER VARYING, CHARACTER LARGE OBJECT,
         BINARY LARGE OBJECT, BIT, BIT VARYING, NUMERIC, DECIMAL, INTEGER,
         SMALLINT, FLOAT, REAL, DOUBLE PRECISION, BOOLEAN, DATE, TIME,
         TIMESTAMP, and INTERVAL. These names are used in the type

and if we don't treat them as keywords then we will have a couple of
problems.  One is case-conversion issues in locales where the standard
downcasing is not an extension of ASCII (Turkish is the only one I know
of offhand).  Another is that depending on where you put the renaming
that this patch removes without replacing :-(, it would be possible for
the renaming transformation to get applied to user-defined types with
similar names, or for user-defined types to unexpectedly shadow system
definitions.  The former would be surprising and the latter would
violate the spec.  Check the archives; I'm sure this was discussed in
the 7.3 development cycle and we concluded that treating these names
as keywords was the only practical solution.

            regards, tom lane

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: hint infrastructure setup (v3)
Следующее
От: Manfred Koizar
Дата:
Сообщение: O(samplesize) tuple sampling, proof of concept