Re: set timestamp oddness

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: set timestamp oddness
Дата
Msg-id 19235.1081227030@sss.pgh.pa.us
обсуждение исходный текст
Ответ на set timestamp oddness  (Will Trillich <will@serensoft.com>)
Список pgsql-general
Will Trillich <will@serensoft.com> writes:
>     db=# set timezone = '-6';
>     SET
>     db=# show timezone;
>         TimeZone
>     ----------------
>      -00:00:00.0216
>     (1 row)

hmm ... I get something reasonable here:

regression=# set timezone = '-6';
SET
regression=# show timezone;
 TimeZone
-----------
 -06:00:00
(1 row)

Could you poke into this more and find out why it goes wrong on your
platform?

>     db=# set timezone to '-5:00';
>     ERROR:  unrecognized time zone name: "-5:00"

That one works for me too...

> the one that "set time zone" does NOT accept, "at time zone" DOES.
> hmm?

This is not totally surprising, seeing that they go through completely
different code paths.  I believe "set time zone" accepts whatever the
underlying OS's tzset() routine will take, whereas "at time zone"
only accepts timezone names listed in datetime.c's builtin table.
The difference could and someday should be eliminated, but it will
take rewriting a lot of OS-level timezone support for ourselves :-(

            regards, tom lane

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

Предыдущее
От: David Wheeler
Дата:
Сообщение: pg_autovacuum won't make on FreeBSD
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: psql's "\d" and CLUSTER