Search Postgresql Archives

Re: Functions and Parentheses

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

 



On Fri, Oct 6, 2017 at 2:18 PM, Igal @ Lucee.org <igal@xxxxxxxxx> wrote:

Hi,

Is current_date a function?  It's a bit puzzling to me since there are no parentheses after it, i.e.

  SELECT current_date;

And not

  SELECT current_date();  -- syntax error

It, and the others like it, behave as functions.  They don't require parentheses because the SQL standard​
​ defines them without parentheses.

How come `current_date` has no parenthesis but `clock_timestamp()` does?

clock_timestamp isn't standard defined and unless the standard forces us to do otherwise function invocation requires parentheses.


David J.


[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