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:52:18 |
Message-ID: | 87odn0zjnh.fsf@stark.xeocode.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Gregory Stark" <stark(at)enterprisedb(dot)com> writes:
> "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.
Actually sorry, that's true but it seems it's a bug. The comments even use the
example INTERVAL '1' YEAR which one imagines the author didn't intend to be
parsed as a 1 second interval measured in years.
Looking more at it now. There are a couple different grammar productions that
look like they might be relevant, I'm not sure which is getting used here.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-03-11 01:11:06 | Re: Why is this allowed? |
Previous Message | Gregory Stark | 2007-03-11 00:40:29 | Re: Why is this allowed? |