Обсуждение: Beta2 "horology" test failure on non-US zoneinfo/posixrules

Поиск
Список
Период
Сортировка

Beta2 "horology" test failure on non-US zoneinfo/posixrules

От
Radoslaw Zielinski
Дата:
Hello,

I'm building beta2 --with-system-tzdata, my /usr/share/zoneinfo/posixrules
is a symbolic link to localtime, which is Europe/London; the horology test
fails in three places:
 --- expected/horology.out    2007-07-25 18:22:36.000000000 +0100 +++ results/horology.out    2007-11-10
21:15:50.325553844+0000 @@ -605,7 +605,7 @@  SELECT timestamp with time zone '2005-04-02 12:00-07' + interval '1 day'
as"Apr 3, 12:00";           Apr 3, 12:00           ------------------------------ - Sun Apr 03 12:00:00 2005 CDT + Sun
Apr03 13:00:00 2005 CDT  (1 row)    SELECT timestamp with time zone '2005-04-02 12:00-07' + interval '24 hours' as "Apr
3,13:00"; @@ -617,13 +617,13 @@  SELECT timestamp with time zone '2005-04-03 12:00-06' - interval '1 day' as "Apr 2,
12:00";          Apr 2, 12:00           ------------------------------ - Sat Apr 02 12:00:00 2005 CST + Sat Apr 02
12:00:002005 CDT  (1 row)    SELECT timestamp with time zone '2005-04-03 12:00-06' - interval '24 hours' as "Apr 2,
11:00";          Apr 2, 11:00           ------------------------------ - Sat Apr 02 11:00:00 2005 CST + Sat Apr 02
12:00:002005 CDT  (1 row)    RESET TIME ZONE; 

If .../posixrules is a symlink to America/New_York (as originally in
tzdata) or does not exist at all, the test passes.  Question: what is
broken here?  Postgres, my setup, the concept behind posixrules...?

--
Radosław Zieliński <radek@pld-linux.org>

Re: Beta2 "horology" test failure on non-US zoneinfo/posixrules

От
Tom Lane
Дата:
Radoslaw Zielinski <radek@pld-linux.org> writes:
> I'm building beta2 --with-system-tzdata, my /usr/share/zoneinfo/posixrules
> is a symbolic link to localtime, which is Europe/London; the horology test
> fails in three places:
> ...
> If .../posixrules is a symlink to America/New_York (as originally in
> tzdata) or does not exist at all, the test passes.  Question: what is
> broken here?  Postgres, my setup, the concept behind posixrules...?

I think nothing is broken: the regression tests are detecting that
there's something unexpected about the behavior of your platform,
which is what they're supposed to do.  The particular tests in question
are run with SET TIME ZONE 'CST7CDT', and since that's not a recognized
time zone name (CST6CDT is...), it's interpreted as using posixrules.

In general, --with-system-tzdata is going to expose you to behavioral
differences compared to a standard Postgres installation.  There's
nothing we can or want to do about that.

An interesting question here is whether the use of 'CST7CDT' was a typo
or an intentional invocation of an unknown POSIX-spec timezone setting.
I suspect it was a typo, because it was added here:
http://archives.postgresql.org/pgsql-committers/2005-07/msg00650.php
and there's nothing to suggest that Michael was thinking specifically
of POSIX-style timezones.  However, I think it's probably good that
that corner case is getting tested, so I'm inclined to leave it alone
(but maybe add a comment pointing out what is happening).  OTOH, maybe
that is more platform dependence than we want?
        regards, tom lane