The Postgres INTERVAL literal is not compliant with
the ANSI 2003 SQL Spec. Here's the Postgres way:
# select INTERVAL '45 DAY';
interval
----------
45 days
(1 row)
The spec. says
<interval literal> ::= INTERVAL [ <sign> ] <interval
string> <interval qualifier>
<interval string> ::= <quote> <unquoted interval
string> <quote>
Note specifically that the quotes only enclose the
number, not the interval qualifier. So Postgres
interval literals should be
# select INTERVAL '45' DAY;
interval
----------
00:00:00
(1 row)
Note that Postgres accepts the ANSI form but then
interprets it completely incorrectly. IMHO this is
much worse than rejecting the ANSI form. Are there
plans to fix this? I am using 7.4.3.
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org