Обсуждение: why isn't TEXT a key word?

Поиск
Список
Период
Сортировка

why isn't TEXT a key word?

От
culley harrelson
Дата:
I wrote a little vim script that converts the case of postgresql
keywords to uppercase and I noticed that TEXT was not being hit.  Sure
enough TEXT is not listed as a key word in the sql key word appendix.  I
thought it was strange that TEXT, a data type, is not a key word.

culley


Re: why isn't TEXT a key word?

От
Tom Lane
Дата:
culley harrelson <culley@fastmail.fm> writes:
> I thought it was strange that TEXT, a data type, is not a key word.

Why would you think that?  Given that Postgres has an extensible type
system, we'd hardly want type names to be keywords.  They're just
identifiers.

We do have keywords for some types that are mandated to have special
syntax by the SQL spec, such as "character varying(n)", because they
need special processing in the grammar.

            regards, tom lane