Re: timestamp

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: timestamp
Дата
Msg-id 3CF778D4.8D231DD@fourpalms.org
обсуждение исходный текст
Ответ на timestamp  (Laurette Cisneros <laurette@nextbus.com>)
Список pgsql-general
> We currently have several tables that have columns defined as timestamp.
> Does simply defining the column as timestamp imply "with time zone"?

Yes. But the next release will have the default be "without time zone"
to comply with SQL9x specs.

> This timestamp field contains data such as:
>  2002-05-28 07:19:41-04
> However, when I pg_dump this table and then pg_restore it on another database, this
> timestamp field now becomes:
>  2002-05-28 04:19:41-07
> How do I maintain the same value for the timestamp fields when I restore
> tables that have timestamp columns?

These are the same values. It is the same absolute time represented in
different time zones. Your solution of using PGTZ is the right one if
you want to ensure that all times are displayed in the same time zone.

                     - Thomas

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

Предыдущее
От: Emil Eifrem
Дата:
Сообщение: Re: Transactions and constraints
Следующее
От: Cleiton Peres Reis
Дата:
Сообщение: Re: restoring DB