Re: timestamp - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: timestamp
Date
Msg-id 3CF778D4.8D231DD@fourpalms.org
Whole thread Raw
In response to timestamp  (Laurette Cisneros <laurette@nextbus.com>)
List 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 by date:

Previous
From: Emil Eifrem
Date:
Subject: Re: Transactions and constraints
Next
From: Cleiton Peres Reis
Date:
Subject: Re: restoring DB