Re: Why is this allowed? - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: Why is this allowed?
Date
Msg-id Pine.LNX.4.58.0703111255460.21640@linuxworld.com.au
Whole thread Raw
In response to Re: Why is this allowed?  ("Chuck McDevitt" <cmcdevitt@greenplum.com>)
List pgsql-hackers
On Sat, 10 Mar 2007, Chuck McDevitt wrote:

> Ok...
>
> Just to be clear, the ISO SQL spec says that  INTERVAL '1' DAY is the
> correct way to specify a one-day interval.
> That's why it is surprising that PostgreSQL treats it differently, with
> no error or warning.
>
> The PostgreSQL syntax INTERVAL '1 DAY' is non-standard.
>
> Is fixing this on the TODO list?

Yes: Add ISO INTERVAL handling

There's detail there about the nature of support required. Personally, I
think the syntax is awful. I don't understand why intervals are handled so
differently in the spec as compared to other data types. This syntax is
well supported by Oracle and DB2 though. I guess it should be completed in
postgres.

Thanks,

Gavin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why is this allowed?
Next
From: Michael Fuhr
Date:
Subject: Re: Race condition in pg_database_size()