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