Re: Timestamp Datatype Changing automatically to Timestamp without time zone - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: Timestamp Datatype Changing automatically to Timestamp without time zone
Date
Msg-id dcc563d10906300740o64e25f07pe36e91e4d81466be@mail.gmail.com
Whole thread Raw
In response to Timestamp Datatype Changing automatically to Timestamp without time zone  (Rajdeep Das <sendrajster@gmail.com>)
Responses Re: Timestamp Datatype Changing automatically to Timestamp without time zone  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Tue, Jun 30, 2009 at 1:13 AM, Rajdeep Das<sendrajster@gmail.com> wrote:
> Dear Sir/Madam,
> This is important and I need your help here.
> I have taken a dump of my database from the old version of pg viz.8.1, using
> pg_dump command. In the db I have a table with a column of datatype
> 'timestamp'. Now, when I try to restore it on the new pg version 8.3, the
> datatype of the column is getting altered to 'timestamp with no time zone'.
> This change is causing my SQL to fail as TO_TIMESTAMP function is reporting
> error.
> Please suggest me the cause of this automatic datatype change. Also, tell me
> how to make my TO_TIMESTAMP and other data functions work.

If I remember correctly, the sql standard says that timestamp, alone,
means timestamp without timezone.  But prior to 8.1 pgsql implemented
timestamp as timestamp with timezone.  I'm guessing you're getting
bitten by that.  You'd probably have to edit the db dump to change the
ddl declarations of timestamp to timestamptz.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timestamp Datatype Changing automatically to Timestamp without time zone
Next
From: Tom Lane
Date:
Subject: Re: Timestamp Datatype Changing automatically to Timestamp without time zone