Re: [GENERAL] Functions and Parentheses

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Functions and Parentheses
Дата
Msg-id CAKFQuwZvUJSRir_Ap_GLSgOJGWUimOnkrv2GbiAqi6=c0JCNzw@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Functions and Parentheses  ("Igal @ Lucee.org" <igal@lucee.org>)
Список 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 по дате отправления:

Предыдущее
От: "Igal @ Lucee.org"
Дата:
Сообщение: [GENERAL] Functions and Parentheses
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Functions and Parentheses