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