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

From Gregory Stark
Subject Re: Why is this allowed?
Date
Msg-id 87slcczk76.fsf@stark.xeocode.com
Whole thread Raw
In response to Why is this allowed?  ("Chuck McDevitt" <cmcdevitt@greenplum.com>)
Responses Re: Why is this allowed?  (Gregory Stark <stark@enterprisedb.com>)
Re: Why is this allowed?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Chuck McDevitt" <cmcdevitt@greenplum.com> writes:

> Why don't we have some kind of error check for people entering things
> like   INTERVAL '1' DAY in their query, since we don't handle it.

Because it's not an error. It just doesn't mean what you think it means.

You've requested an interval measured in days and supplied '1' as the value
which is read as a single second. 

Hm, the documentation doesn't describe this syntax but the comments in the
source imply that this postfix precision notation is required and there's
quite a bit of code in gram.y to support it.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Chuck McDevitt"
Date:
Subject: Why is this allowed?
Next
From: Gregory Stark
Date:
Subject: Re: Why is this allowed?