Re: Why is this allowed?
От | Gregory Stark |
---|---|
Тема | Re: Why is this allowed? |
Дата | |
Msg-id | 87odn0zjnh.fsf@stark.xeocode.com обсуждение исходный текст |
Ответ на | Re: Why is this allowed? (Gregory Stark <stark@enterprisedb.com>) |
Список | pgsql-hackers |
"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
В списке pgsql-hackers по дате отправления: