Re: Simplicity in time/date functions - Mailing list pgsql-general

From Tom Lane
Subject Re: Simplicity in time/date functions
Date
Msg-id 15750.1010091905@sss.pgh.pa.us
Whole thread Raw
In response to Re: Simplicity in time/date functions  (Jason Earl <jason.earl@simplot.com>)
Responses Re: Simplicity in time/date functions
List pgsql-general
Jason Earl <jason.earl@simplot.com> writes:
> Try:
> processdata=> SELECT CURRENT_DATE - 28;

> Thomas could probably explain why this is.

Because the SQL92 spec says so.

CURRENT_DATE with empty parens *is* allowed by ODBC, apparently, and
for 7.2 Peter Eisentraut hacked the parser to accept it with or without
empty parens.  Thomas was not happy with that, and wants to take it out
again in 7.3, but I'd prefer to see things left as-is.  IMHO there's no
real good reason *not* to accept the empty parens, and we'll keep
getting this sort of question if we revert to the hard-line
SQL-spec-and-nothing-but approach.

            regards, tom lane

pgsql-general by date:

Previous
From: Jason Earl
Date:
Subject: Re: Simplicity in time/date functions
Next
From: "Johnson, Shaunn"
Date:
Subject: force justification of columns