Re: User-defined typle similar to char(length) varchar(length)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: User-defined typle similar to char(length) varchar(length)
Дата
Msg-id 14115.1154353736@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: User-defined typle similar to char(length) varchar(length)  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: User-defined typle similar to char(length) varchar(length)  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> No. Search the archives for discussions about "user defined typmod".
> The basic problem came down too that the set of allowed words for
> functions and types would be forced to be the same (due to restrictions
> in lookahead), and people wern't happy with that because if may hamper
> future SQL compatability. There were ways around this (all fairly ugly
> though).

I seem to remember that someone had come up with an idea that might
allow it to work, but no one pushed it as far as coming up with a patch.
It's definitely the grammar that is the problem though, specifically
constructs like
char(42) 'literal value here'

If you don't treat the names of these types as reserved, it is darn hard
to tell that you're not looking at a function call until you get to the
right paren and see a string literal as lookahead ... and postponing the
parse decision that long is painful.
        regards, tom lane


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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: Connection limit and Superuser
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Connection limit and Superuser