Re: Regarding niladic functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Chandra Sekhar Surapaneni <chandu(at)positivenetworks(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Regarding niladic functions
Date: 2005-04-05 05:32:33
Message-ID: 9754.1112679153@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Neil Conway <neilc(at)samurai(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2005-04-05 05:59:46 Re: Regarding niladic functions (another form)
Previous Message go 2005-04-05 04:35:54 Re: How to dump data from database?