Search Postgresql Archives

Re: Regarding niladic functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Neil Conway <neilc@xxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux