From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Edmundo Robles <edmundo(at)sw-argos(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: recovery dump on database with different timezone |
Date: | 2017-01-24 00:58:36 |
Message-ID: | CAKFQuwZ5e-_F6Bt_F3vy+WVe21vXpb8yuS2n6N9bEopo+S4vGw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Jan 23, 2017 at 4:45 PM, Edmundo Robles <edmundo(at)sw-argos(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2017-01-24 00:59:27 | Re: recovery dump on database with different timezone |
Previous Message | Adrian Klaver | 2017-01-24 00:57:18 | Re: recovery dump on database with different timezone |