Re: [GENERAL] recovery dump on database with different timezone

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] recovery dump on database with different timezone
Дата
Msg-id CAKFQuwZ5e-_F6Bt_F3vy+WVe21vXpb8yuS2n6N9bEopo+S4vGw@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] recovery dump on database with different timezone  (Edmundo Robles <edmundo@sw-argos.com>)
Список pgsql-general
On Mon, Jan 23, 2017 at 4:45 PM, Edmundo Robles <edmundo@sw-argos.com> wrote:
* This is  the message: COPY failed for table "stlm_201012ad": ERROR:  new row for relation "stlm_201012ad" violates check constraint "time_stamp_201012ad"
DETAIL:  Failing row contains (..., 2011-01-01 00:00:03.925+00, .., 0).

* this the  constraint:  "time_stamp_201012ad" CHECK (time_stamp >= '2010-12-01'::date AND time_stamp < '2011-01-01'::date)
​​

​I'm not that fluent experimenting with dump/restore mechanics (hence the uncertainty below) but...​

​Your record only passes the check constraint if the system is in a timezone West of UTC.  Because then at least 1 hour is subtracted from the supplied timestamp before converting it into date for comparison.

If you set the target database timezone to be the proper designation for "localtime" the restoration might work.

Your claim that the source system was setup for UTC is suspect...

David J.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] recovery dump on database with different timezone
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] recovery dump on database with different timezone