Re: timestamp

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Laurette Cisneros <laurette(at)nextbus(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamp
Date: 2002-05-31 13:21:24
Message-ID: 3CF778D4.8D231DD@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • timestamp at 2002-05-30 20:07:22 from Laurette Cisneros

Browse pgsql-general by date

  From Date Subject
Next Message Cleiton Peres Reis 2002-05-31 13:50:27 Re: restoring DB
Previous Message Emil Eifrem 2002-05-31 12:48:18 Re: Transactions and constraints