Skip site navigation (1) Skip section navigation (2)

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

From: Mozilla at Marela <mozilla(at)marela(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Critical: Pgsql inserts bad timestamp (seconds 60.00) - causes failing of backup-restore
Date: 2002-03-11 17:59:31
Message-ID: 3C8CF083.6090504@marela.com (view raw or flat)
Thread:
Lists: 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

Next:From: Juliano IgnacioDate: 2002-03-11 20:12:07
Subject: Re:
Previous:From: Stephan SzaboDate: 2002-03-11 17:02:09
Subject: Re:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group