Re: [GENERAL] Functions and Parentheses - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Functions and Parentheses
Date
Msg-id CAKFQuwZvUJSRir_Ap_GLSgOJGWUimOnkrv2GbiAqi6=c0JCNzw@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Functions and Parentheses  ("Igal @ Lucee.org" <igal@lucee.org>)
List pgsql-general
On Fri, Oct 6, 2017 at 2:18 PM, Igal @ Lucee.org <igal@lucee.org> 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.

pgsql-general by date:

Previous
From: "Igal @ Lucee.org"
Date:
Subject: [GENERAL] Functions and Parentheses
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Functions and Parentheses