Re: Problem with a date when restoring on postgresql 7.4.9 : date/time field value out of range

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Problem with a date when restoring on postgresql 7.4.9 : date/time field value out of range
Дата
Msg-id 20061011013728.GD72517@nasby.net
обсуждение исходный текст
Ответ на Problem with a date when restoring on postgresql 7.4.9 : date/time field value out of range  (Thomas Poindessous <Thomas.Poindessous@seii.fr>)
Список pgsql-general
On Fri, Oct 06, 2006 at 05:15:55PM +0200, Thomas Poindessous wrote:
> Hello,
>
> I have a problem with my postgresql 7.4.9 server.
>
> I tried to restore a dump on the backup server (same version).
>
> I got this error :
>
> pg_restore: ERROR:  date/time field value out of range: "0001-02-29
> 00:00:00 BC"
>
> I understand this error, but I can't understand why postgresql didn't
> refused to insert it on the main server.
>
> The faulty script is a php script which uses postgresql 7.4.13 library
> (on another server).
>
> I don't think this error is corrected on 7.4.13 server (so even if I
> upgrade I will get this error).
>
> How can I do to be sure that my dump can be restored without a problem ?

This is something that was probably channged somewhere between the
version of the database that the dump was taken on and the version
you're trying to restore to. Your best bet is to restore the dump to a
database of that original version, fix the data, dump again, then
restore to the newer version. And while you're at it, you should look at
upgrading to 8.0.x or 8.1.x (though if you're using UTF8 you can run
into some invalid data issues there as well).
--
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: postgresql.conf shared buffers
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: more anti-postgresql FUD