Re: [SQL] CURRENT_TIMSTAMP

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: [SQL] CURRENT_TIMSTAMP
Дата
Msg-id 20021202132429.A57292-100000@megazone23.bigpanda.com
обсуждение исходный текст
Список pgsql-admin
On Mon, 2 Dec 2002, Raymond Chui wrote:

> I created a column, dada type timstamp with time zone
> and with default CURRENT_TIMSTAMP
> it shows me the default is
>
> default ('now'::text)::timstamp(6) with time zone
>
> Then when I insert a row, the default timestamp value is
>
> yyyy-mm-dd HH:MM:ss.mmmmm+00
>
> where mmmmm is milliseconds.
> How do I make default only yyyy-mm-dd HH:MM:ss+00 ?

As already suggested you probably want a timestamp with time zone(0)
column, but if you really want the ability to insert partial seconds but
the default to not have partial seconds, you can use
CURRENT_TIMESTAMP(0) I believe.



В списке pgsql-admin по дате отправления:

Предыдущее
От: "Nick Fankhauser"
Дата:
Сообщение: Re: pg_restore error: function plpgsql_call_handler already exists with same argument types
Следующее
От: "David F. Skoll"
Дата:
Сообщение: What kind of index to use for many rows with few unique values?