Re: Why is this allowed?

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Chuck McDevitt" <cmcdevitt(at)greenplum(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why is this allowed?
Date: 2007-03-11 00:40:29
Message-ID: 87slcczk76.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Chuck McDevitt" <cmcdevitt(at)greenplum(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-03-11 00:52:18 Re: Why is this allowed?
Previous Message Chuck McDevitt 2007-03-11 00:09:42 Why is this allowed?