| From: | "Dave Page" <dpage(at)pgadmin(dot)org> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Timezone abbreviations - out but not in? |
| Date: | 2008-06-10 13:23:03 |
| Message-ID: | 937d27e10806100623i2f3497d0rfd7acecc87311676@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Merlin Moncure | 2008-06-10 14:11:20 | Re: libpq support for arrays and composites |
| Previous Message | Zdenek Kotala | 2008-06-10 13:11:50 | Re: RFD: ALTER COLUMN .. SET STORAGE COMPRESSED; |