Re: date/time compatible problems in 7.2

From: Ruslan A Dautkhanov <rusland(at)scn(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: date/time compatible problems in 7.2
Date: 2002-02-21 04:00:58
Message-ID: 3C7470FA.5C17E04@scn.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart wrote:

> > I has pg_dump my DB in 7.1.3 and try ro pg_restore it in 7.2
> > version.
> > psql:/.../dbdump/.dbrestore.tmp:1624094: ERROR: copy: line 1, Bad
> > timestamp external representation 'Fri 25 Jan 23:59:59 2002 KRAT'
> > psql:/.../dbdump/.dbrestore.tmp:1624094: lost synchronization with
> > server, resetting connection
>
> Not sure why it is crashing. But "KRAT" is a time zone not recognized
by
> the PostgreSQL date/time parser. In fact it could be afaik (it is
> mentioned but commented-out in the parser) but it either had a screwy
> definition or I couldn't figure out what the definition was. It could
be
> added for 7.2.1 (and I could send a patch beforehand) if I knew the
> proper definition. Check src/backend/utils/adt/datetime.c and look for

> "krat".

KRAT,KRAST is timezone code generated by FreeBSD automatically.
You can check up /usr/share/zoneinfo - it have all timezones.
You can see timezones KRAT,KRAST in file
/usr/share/zoneinfo/Asia/Krasnoyarsk.

I already break idea to pg_dump in 7.1.3 and pg_restore in 7.2 and
tried to remove ' KRAT' substring from all my *.dat files, created
by
pg_dump and change schema to fields without timezone. After I tried
pg_restore only data from dbdump-file, but pg_restore says, that
can't initialize header from TOC-file, but I not even touched it.
TOC - is only one binary file in dbdump-file. I think that it also
have
smth like CRC code about all other files, and this is reason why
they
say that can't initialize TOC-file?

How to patch datetime.c to 7.2 permit my 'KRAT' timezone?

Greatly appreciate,
Ruslan A Dautkhanov

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-02-21 04:04:58 Re: UTF-8 data migration problem in Postgresql 7.2
Previous Message Christopher Kings-Lynne 2002-02-21 03:52:56 Re: SET NULL / SET NOT NULL