Re: Bad timestamp external representation

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: sfpug(at)postgresql(dot)org
Subject: Re: Bad timestamp external representation
Date: 2004-01-12 17:45:56
Message-ID: 200401120945.56983.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Miles,

> were experiencing some problems when restoring certain databases that
> were dumped with pg_dump, where the date inserted using now() has some
> strange rounding applied ... (postgres version is 7.2)
>
> ERROR: copy: line 2, Bad timestamp external representation '2002-07-31
> 24:00:00'

Howdy and welcome to SFPUG! I'm glad you've joined us; I have dreams of
someday getting your employer to do a case study.

Correcting the dump file is easy; just do a search-and-replace (prefereably
with sed or Perl) for 24:00:00 and replace it with 00:00:00 , which is the
accepted format.

I'm very curious how the dump file was generated, though. PostgreSQL does
not accept 24:00 as a valid time, and pg_dump certainly wouldn't generate it.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse sfpug by date

  From Date Subject
Next Message miles 2004-01-12 20:38:55 Re: Bad timestamp external representation
Previous Message miles 2004-01-11 19:37:18 Bad timestamp external representation