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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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;

Browse pgsql-bugs by date

  From Date Subject
Next Message Juliano Ignacio 2002-03-11 20:12:07 Re:
Previous Message Stephan Szabo 2002-03-11 17:02:09 Re: