From: Takahiro Itagaki on 11 May 2010 04:03 Aftab Hussain <aftab.se(a)gmail.com> wrote: > Please accept attached patch for the following problem. This patch has not been replied, but I can reproduce the error with: =# SET timezone = 'Asia/Karachi'; =# SELECT timeofday()::timestamptz; ERROR: invalid input syntax for type timestamp with time zone: "Tue May 11 13:26:53.264293 2010 PKST" Should we add PKST timezone? Also, I found a list of timezones[1] and we don't have 36 tznames in the list. Should we also need them? ACDT, AEDT, AWDT BIT CBT, CDBT, CIST HMT PKST, PMT R*T and R*DT series, WCDT, WCT, WIB, WITA, WKT [1] http://www.world-time-zones.org/zones/ > aftab(a)aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ > aftab(a)aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ ./psql postgres > psql (9.0beta1) > Type "help" for help. > > postgres=# SHOW timezone; > TimeZone > -------------- > Asia/Karachi > (1 row) > > postgres=# > postgres=# CREATE TABLE test_table (c1 INT, c2 TIMESTAMP DEFAULT > timeofday()::TIMESTAMP); > CREATE TABLE > postgres=# INSERT INTO test_table VALUES (1); > ERROR: invalid input syntax for type timestamp: "Fri Apr 30 15:36:43.906075 > 2010 PKST" > postgres=# > > And here is a little bit information about the system I am using. > > aftab(a)aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ uname -a > Linux aftab-laptop 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC > 2010 i686 GNU/Linux > aftab(a)aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ > aftab(a)aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ ./pg_config > --version > PostgreSQL 9.0beta1 > aftab(a)aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ Regards, --- Takahiro Itagaki NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Heikki Linnakangas on 11 May 2010 04:45 Takahiro Itagaki wrote: > Aftab Hussain <aftab.se(a)gmail.com> wrote: > >> Please accept attached patch for the following problem. > > This patch has not been replied, but I can reproduce the error with: > =# SET timezone = 'Asia/Karachi'; > =# SELECT timeofday()::timestamptz; > ERROR: invalid input syntax for type timestamp with time zone: "Tue May 11 13:26:53.264293 2010 PKST" > > Should we add PKST timezone? Also, I found a list of timezones[1] > and we don't have 36 tznames in the list. Should we also need them? I don't think we want to include all timezone names in the default config, timezone abbreviations aren't always unique for example. But we should include PKST because we already include PKT; it would be nasty for an application to work during winter, and stop working when the daylight saving time begins. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 11 May 2010 11:06 Heikki Linnakangas <heikki.linnakangas(a)enterprisedb.com> writes: > Takahiro Itagaki wrote: >> Should we add PKST timezone? Also, I found a list of timezones[1] >> and we don't have 36 tznames in the list. Should we also need them? > I don't think we want to include all timezone names in the default > config, timezone abbreviations aren't always unique for example. But we > should include PKST because we already include PKT; it would be nasty > for an application to work during winter, and stop working when the > daylight saving time begins. I don't think that's actually it. It looks to me like the Asia/Karachi zone definition expects the abbreviations to be PKST and PKDT. Not sure whether PKT is really in use, but it is not sensible to add PKST by itself. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Heikki Linnakangas on 11 May 2010 12:51 Tom Lane wrote: > Heikki Linnakangas <heikki.linnakangas(a)enterprisedb.com> writes: >> Takahiro Itagaki wrote: >>> Should we add PKST timezone? Also, I found a list of timezones[1] >>> and we don't have 36 tznames in the list. Should we also need them? > >> I don't think we want to include all timezone names in the default >> config, timezone abbreviations aren't always unique for example. But we >> should include PKST because we already include PKT; it would be nasty >> for an application to work during winter, and stop working when the >> daylight saving time begins. > > I don't think that's actually it. It looks to me like the Asia/Karachi > zone definition expects the abbreviations to be PKST and PKDT. Not sure > whether PKT is really in use, but it is not sensible to add PKST by > itself. How did you come to that conclusion? Googling for "Karachi PKDT" produces no hits that would suggest PKDT to be a valid timezone name. This (http://www.speaking-clock.com/Asia-Pakistan-Karachi_212.html) and this (http://www.timeanddate.com/worldclock/clockchange.html?n=757&year=2009) also agree that PKT is the abbreviation for the winter time and PKST for the summer time. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 11 May 2010 13:08
Heikki Linnakangas <heikki.linnakangas(a)enterprisedb.com> writes: > Tom Lane wrote: >> I don't think that's actually it. It looks to me like the Asia/Karachi >> zone definition expects the abbreviations to be PKST and PKDT. Not sure >> whether PKT is really in use, but it is not sensible to add PKST by >> itself. > How did you come to that conclusion? Er ... misreading the zone definition, that's how. Nevermind. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |