Re: Regarding niladic functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regarding niladic functions
Дата
Msg-id 9754.1112679153@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Regarding niladic functions  (Neil Conway <neilc@samurai.com>)
Ответы Re: Regarding niladic functions (another form)  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Список pgsql-general
Neil Conway <neilc@samurai.com> writes:
> If you mean a function that doesn't take any arguments and can be
> invoked without an empty set of parentheses (like current_timestamp),
> there isn't a way to define such a function via SQL. You could probably
> hack the SQL parser to add support for specific functions like this, as
> is done for current_timestamp and friends.

It would in fact *require* a parser change, which is why we don't
support it.

(Personally I think it was tremendously stupid of the SQL committee
to define these things as keywords rather than functions, anyway ...
as is, they conflict with column names, which they would not do if
they were invoked as foo() ...)

            regards, tom lane

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

Предыдущее
От: go
Дата:
Сообщение: Re: How to dump data from database?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Regarding niladic functions (another form)