Interval literal not ANSI compliant
От | Ed Smith |
---|---|
Тема | Interval literal not ANSI compliant |
Дата | |
Msg-id | 20040901222909.33921.qmail@web52903.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: Interval literal not ANSI compliant
|
Список | pgsql-general |
The Postgres INTERVAL literal is not compliant with the ANSI 2003 SQL Spec. Here's the Postgres way: # select INTERVAL '45 DAY'; interval ---------- 45 days (1 row) The spec. says <interval literal> ::= INTERVAL [ <sign> ] <interval string> <interval qualifier> <interval string> ::= <quote> <unquoted interval string> <quote> Note specifically that the quotes only enclose the number, not the interval qualifier. So Postgres interval literals should be # select INTERVAL '45' DAY; interval ---------- 00:00:00 (1 row) Note that Postgres accepts the ANSI form but then interprets it completely incorrectly. IMHO this is much worse than rejecting the ANSI form. Are there plans to fix this? I am using 7.4.3. _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush
В списке pgsql-general по дате отправления: