Re: [GENERAL] Question on timestamp in psql
| От | Bruce Momjian |
|---|---|
| Тема | Re: [GENERAL] Question on timestamp in psql |
| Дата | |
| Msg-id | 200001111628.LAA10481@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Question on timestamp in psql (Robert Rothe <rrothe@mindspring.com>) |
| Список | pgsql-general |
> When I type the following at the psql prompt:
>
> select timestamp('now');
>
> ...I always get december 31, 1999.
>
> If I use 'now' as the rvalue to a SET, or within an INSERT, it returns
> the correct date.
>
> Is this a known problem? I'm running 6.5.2-1.
Yikes, confirmed in current sources:
test=> select timestamp('now');
timestamp
------------------------
1999-12-31 19:00:00-05
(1 row)
This works:
test=> select timestamp('now'::timestamp);
timestamp
------------------------
2000-01-11 11:28:08-05
(1 row)
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: