| От | Tom Lane |
|---|---|
| Тема | Re: Bug #947: time(timenow()) Parse Error |
| Дата | |
| Msg-id | 2959.1050550126@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bug #947: time(timenow()) Parse Error (pgsql-bugs@postgresql.org) |
| Список | pgsql-bugs |
pgsql-bugs@postgresql.org writes:
> time(timenow()) Parse Error
The syntax time(something) is now taken as a type name per SQL spec.
You need to write this with explicit cast syntax, or else put quotes
around "time":
select now()::time;
select cast(now() as time);
select "time"(now());
Although I'm wondering whether you shouldn't just be using
select current_time;
Note that the variants with timenow() run into a similar problem, which
is that the "time"(abstime) function has got the same mistake
internally. I'm surprised no one noticed this for two whole releases...
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера