Re: Odd Timestamp Error WAS Re: Function Creation Error
| От | Tom Lane |
|---|---|
| Тема | Re: Odd Timestamp Error WAS Re: Function Creation Error |
| Дата | |
| Msg-id | 7030.1176044198@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Odd Timestamp Error WAS Re: Function Creation Error (Joshua Kramer <josh@globalherald.net>) |
| Ответы |
Re: Odd Timestamp Error WAS Re: Function Creation Error
|
| Список | pgsql-novice |
Joshua Kramer <josh@globalherald.net> writes:
> LOG: statement: INSERT INTO auth_tickets (user_id,
> expire_datetime, init_datetime, init_ip_addr, ticket_serial) VALUES ('2',
> 'now() + 6 * interval ''1 hour''', 'now()', '192.168.2.2',
> '44d6e7d4b2e87632a65cd34501aeea614bffde5f')
> ERROR: invalid input syntax for type timestamp: "now() + 6 * interval '1
> hour'"
You seem to be confused about the difference between a literal constant
and an expression. That should just be
LOG: statement: INSERT INTO auth_tickets (user_id,
expire_datetime, init_datetime, init_ip_addr, ticket_serial) VALUES ('2',
now() + 6 * interval '1 hour', now(), '192.168.2.2',
'44d6e7d4b2e87632a65cd34501aeea614bffde5f')
regards, tom lane
В списке pgsql-novice по дате отправления: