Critical: Pgsql inserts bad timestamp (seconds 60.00) - causes failing of backup-restore - Mailing list pgsql-bugs

From Mozilla at Marela
Subject Critical: Pgsql inserts bad timestamp (seconds 60.00) - causes failing of backup-restore
Date
Msg-id 3C8CF083.6090504@marela.com
Whole thread Raw
List pgsql-bugs
Happens on:
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.96
PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96


-- Pgsql inserts bad timestamp (seconds 60.00):


CREATE TABLE datetest ( datecol timestamp );
INSERT INTO datetest VALUES ('2002-01-05 09:/*23:59.999*/');
SELECT * from datetest;
DROP TABLE datetest;
          datecol
---------------------------
 2002-01-05 09:/*23:60.00*/-05
(1 row)


-->> 23 minutes 60 seconds <<--
-- When the database backup is created and restored back into psql,
-- the error 'bad external timestamp representation'
-- occures and pgsql refuses to insert all data into particular table.

-- Workaround: (before backup)
-- UPDATE datetest SET datecol = datecol - '00:00:00.01'::time WHERE
date_part('second',datecol) > 59.99;

pgsql-bugs by date:

Previous
From:
Date:
Subject: Re: comparing null value in plpgsql.
Next
From: Tom Lane
Date:
Subject: Re: Bug #613: Sequence values fall back to previously chec kpointed