Timezone abbreviations - out but not in?

Поиск
Список
Период
Сортировка
От Dave Page
Тема Timezone abbreviations - out but not in?
Дата
Msg-id 937d27e10806100623i2f3497d0rfd7acecc87311676@mail.gmail.com
обсуждение исходный текст
Ответы Re: Timezone abbreviations - out but not in?
Список pgsql-hackers
One of our guys in Pakistan noticed a problem with Slony that seems to
have manifested itself since the last zic update. Slony uses
timeofday() as the default value for a timestamp column:

-- Executing query:
SET timezone='Asia/Karachi';
SELECT timeofday()::timestamp with time zone;

ERROR:  invalid input syntax for type timestamp with time zone: "Tue
Jun 10 19:16:23.186000 2008 PKST"

After a little digging, it was suggested by Heikki that
clock_timestamp() would be a better bet in 8.2+, however, this appears
to have similar issues depending on how it's (mis)used:

-- Executing query:
set timezone='Asia/Karachi';
set datestyle='SQL';
select clock_timestamp()::text::timestamp with time zone;

ERROR:  invalid input syntax for type timestamp with time zone:
"10/06/2008 18:40:36.769046 PKST"

It seems like a bug that we happily output PKST as a timezone (in a
'timestamp with time zone'), but won't accept it back in. Perhaps we
should only output names that we can read back, and revert to a
numeric offset in other cases?

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: RFD: ALTER COLUMN .. SET STORAGE COMPRESSED;
Следующее
От: "汪琦"
Дата:
Сообщение: why copy tuple in the end of trigger when nothing changed in NEW, OLD record variable