"Gregory Stark" <stark@enterprisedb.com> writes:
> "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.
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