BUG #5634: timezone/trigger issue - Mailing list pgsql-bugs

From Jaseb Betts
Subject BUG #5634: timezone/trigger issue
Date
Msg-id 201008300900.o7U90hrN013183@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5634: timezone/trigger issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5634
Logged by:          Jaseb Betts
Email address:      jasen@free.net.nz
PostgreSQL version: 8.3
Operating system:   Windows xp 32 bit
Description:        timezone/trigger issue
Details:

/pgsql/src/timezone/tznames/Default/ doesn't include CAT
this is the timezone used in South Africa (on windows xp platform
it's listed as "(GMT+02:00) Harare, Pretoria" in the timezone dialog)

  http://www.worldtimezone.com/time-africa12.php

As a result with 8.3 on windows some timestamp stuff does not work (in south
africa).

also:
db=> select now();
             now
-----------------------------
 27/08/2010 04:41:07.921 CAT
(1 row)

db=> select now()::text::timestamp;
ERROR:  invalid input syntax for type timestamp: "27/08/2010 04:41:23.375
CAT"

Also if I do NEW.foo=now() in a before update trigger and NEW.foo is of type
TIMEZONE, when I cause the trigger to run I get the same error message as
above.


db=>show lc_time;
 lc_time
---------
 C
 (1 row)

copying the "CAT" entry from Africa.txt into Default seems to fix this.

It suprises me that the timezone comes out as CAT onstead of +02, but I
guess
that's windows doing it's own thing.

I note that EST is apparently also a Brazilian timezone that differs from
the
other two ESTs, but don't know if any users are effected.

 http://www.worldtimezone.com/wtz-names/wtz-est.html

pgsql-bugs by date:

Previous
From: "tkim"
Date:
Subject: BUG #5633: an empty row with null-like values in not-null field
Next
From: Tom Lane
Date:
Subject: Re: BUG #5634: timezone/trigger issue