| От | Tom Lane |
|---|---|
| Тема | Re: intervals in 7.3.1 |
| Дата | |
| Msg-id | 3211.1043077105@sss.pgh.pa.us обсуждение |
| Ответ на | intervals in 7.3.1 (Jukka Väänänen <jukka.vaananen@batman.jypoly.fi>) |
| Список | pgsql-general |
=?ISO-8859-1?Q?Jukka_V=E4=E4n=E4nen?= <jukka.vaananen@batman.jypoly.fi> writes:
> I have been using intervals in postgresql like this:
> select interval('2 weeks');
> We upgraded to 7.3.1 and now this produces error:
> ERROR: parser: parse error at or near "'2 weeks'" at character 17
Yup. "INTERVAL(n)" is now a type name, per SQL spec, and there doesn't
seem to be any way to persuade the parser that it could be a function
call as well. You could double-quote the name:
select "interval"('2 weeks');
but it's probably better to migrate to the cast syntax.
timestamp() has the same problem btw ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера