Re: Bad timestamp external representation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bad timestamp external representation
Дата
Msg-id 29396.1038443759@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bad timestamp external representation  (Jim Worke <jimworke@inbox.lv>)
Ответы Re: Bad timestamp external representation  (Jim Worke <jimworke@inbox.lv>)
Список pgsql-general
Jim Worke <jimworke@inbox.lv> writes:
> I'm using pg_dump from 7.1 to 7.2.  When in postgresql, I run "select
> current_timestamp;" and it came out:
>           timestamptz
> --------------------------------
>  27/11/2002 21:40:46.602827 SGT
> (1 row)

> This is due to running "export PGDATESTYLE='european,sql' before postmaster.
> So, I guess SGT is being recognised.

Depressingly enough, the appearance of SGT in a displayed timestamp
doesn't necessarily mean we'll accept it on input :-(.

IIRC, what you see in the displayed output is whatever the system
reports as its local timezone name, but what can be recognized on input
is what's listed in the table in src/backend/utils/adt/datetime.c.
And there's only a commented-out entry for SGT --- apparently Thomas
either couldn't find a definition for it, or found multiple conflicting
definitions.

What do you think SGT is?

As far as getting your dump to work is concerned, I'd suggest setting
    export PGTZ=GMT
before running pg_dump; that should persuade it to dump everything in
GMT.

            regards, tom lane

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

Предыдущее
От: "Nigel J. Andrews"
Дата:
Сообщение: Why does everyone think MySQL is easier?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Why does everyone think MySQL is easier?