24:00:00 ? - Mailing list pgsql-hackers

From Patrick Welche
Subject 24:00:00 ?
Date
Msg-id 20021204213317.O1219@quartz.newn.cam.ac.uk
Whole thread Raw
List pgsql-hackers
transatlantic=# select '23:59:59.72'::time(0) without time zone;  time   
----------24:00:00
(1 row)

So dumping a table with times derived from the timestamp then fails on the
reload with:

psql:transatlantic.dat:43681: ERROR:  copy: line 5818, Bad time external representation '24:00:00'
psql:transatlantic.dat:43681: lost synchronization with server, resetting connection
timeslice  | timestamp(6) without time zone | timesliced | date                           | timeslicet | time(0)
withouttime zone      | 
 

(timesliced and timesllicet are for M$ Access' benefit and just contain the
date and time parts of timeslice as per above)

So, that's what happened, but what can one do? 24:00:00 seems like a sensible
rounding for 23:59:59.72, and it is also true that 24:00:00 isn't really a
valid time (or could it in strange days with an extra second?), so both
sides seem to be right, it's just the overall effect which seems bad.

(sed s/24:00:00/23:59:59/g fixed the 5.6Gb data file..)

Cheers,

Patrick


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: big text field -> message type 0x44
Next
From: Kevin Brown
Date:
Subject: Re: 7.4 Wishlist