Re: Timestamp Datatype Changing automatically to Timestamp without time zone

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Timestamp Datatype Changing automatically to Timestamp without time zone
Дата
Msg-id dcc563d10906300740o64e25f07pe36e91e4d81466be@mail.gmail.com
обсуждение исходный текст
Ответ на Timestamp Datatype Changing automatically to Timestamp without time zone  (Rajdeep Das <sendrajster@gmail.com>)
Ответы Re: Timestamp Datatype Changing automatically to Timestamp without time zone  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp Datatype Changing automatically to Timestamp without time zone
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp Datatype Changing automatically to Timestamp without time zone