Thread: USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

From
Justin Clift
Date:
Hi all,

Am re-compiling and installing PostgreSQL 7.1.2 on a Mandrake 7.2 platform.
I'm noticing defining the compiler variable "USE_AUSTRALIAN_RULES" is
breaking the regression tests, specifically the horology and timestamp tests.

Just to check I'm doing it right, I'm defining the compiler variable by :

export CFLAGS='-mcpu=i686 -march=i686 -O2 -DUSE_AUSTRALIAN_RULES'
export CPPFLAGS='-mcpu=i686 -march=i686 -O2 -DUSE_AUSTRALIAN_RULES'
./configure --prefix=/opt/postgresql --enable-syslog

As a control test, doing the same thing but leaving out the
-DUSE_AUSTRALIAN_RULES lets the regression tests pass fine.

Is this a known issue I've missed?  If's it's not I'll submit this to the
"bugs" mailing list.

Regards and best wishes,

Justin Clift

Re: USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

From
Tom Lane
Date:
Justin Clift <aa2@bigpond.net.au> writes:
> I'm noticing defining the compiler variable "USE_AUSTRALIAN_RULES" is
> breaking the regression tests, specifically the horology and timestamp tests.

No surprise.  The regression test comparison files are generated in US
timezones.

> Is this a known issue I've missed?  If's it's not I'll submit this to the
> "bugs" mailing list.

Don't bother, unless you have some nifty idea for making the regression
comparison files track the setting.

            regards, tom lane

Re: USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

From
Justin Clift
Date:
Hi Tom,

The only two approaches I can think of are :

a) Make the regression tests run in the GMT timezone (+0, no DST, etc) and
have the expected results also be in GMT.

or

b) Have an alternate set of results available for the timestamp and horology
tests, automatically used when the regression tests are run with
USE_AUSTRALIAN_RULES.

What do you think?

Regards and best wishes,

Justin Clift

On Thursday 07 June 2001 12:22, Tom Lane wrote:
> Justin Clift <aa2@bigpond.net.au> writes:
> > I'm noticing defining the compiler variable "USE_AUSTRALIAN_RULES" is
> > breaking the regression tests, specifically the horology and timestamp
> > tests.
>
> No surprise.  The regression test comparison files are generated in US
> timezones.
>
> > Is this a known issue I've missed?  If's it's not I'll submit this to the
> > "bugs" mailing list.
>
> Don't bother, unless you have some nifty idea for making the regression
> comparison files track the setting.
>
>             regards, tom lane

Re: USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

From
Tom Lane
Date:
Justin Clift <aa2@bigpond.net.au> writes:
> a) Make the regression tests run in the GMT timezone (+0, no DST, etc) and
> have the expected results also be in GMT.

Not good since that would disable all exercising of DST-related
functionality.

> b) Have an alternate set of results available for the timestamp and horology
> tests, automatically used when the regression tests are run with
> USE_AUSTRALIAN_RULES.

Also not good, from a maintenance standpoint --- we have enough variants
of those files already :-(.

I am inclined to think that treating USE_AUSTRALIAN_RULES as a compile
time option was the wrong idea.  It should be a runtime (GUC) option;
then it can be switched off to run the regress tests, regardless of
whether a particular installation keeps it on by default.

            regards, tom lane

Re: USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

From
Justin Clift
Date:
Would it be possible to use the USE_AUSTRALIAN_RULES compile option to only
change the default of a USE_AUSTRALIAN_RULES GUC runtime option to be on?

Hmmm... then again that's kind of useless.  It sounds like it should be a GUC
runtime option as you suggest, and that's about it.

Anyone want to put that on the TODO list?

:-)

Regards and best wishes,

Justin Clift

On Thursday 07 June 2001 19:49, Tom Lane wrote:
> Justin Clift <aa2@bigpond.net.au> writes:
> > a) Make the regression tests run in the GMT timezone (+0, no DST, etc)
> > and have the expected results also be in GMT.
>
> Not good since that would disable all exercising of DST-related
> functionality.
>
> > b) Have an alternate set of results available for the timestamp and
> > horology tests, automatically used when the regression tests are run with
> > USE_AUSTRALIAN_RULES.
>
> Also not good, from a maintenance standpoint --- we have enough variants
> of those files already :-(.
>
> I am inclined to think that treating USE_AUSTRALIAN_RULES as a compile
> time option was the wrong idea.  It should be a runtime (GUC) option;
> then it can be switched off to run the regress tests, regardless of
> whether a particular installation keeps it on by default.
>
>             regards, tom lane

Re: USE_AUSTRALIAN_RULES breaks regression tests in 7.1.2?

From
Peter Eisentraut
Date:
Tom Lane writes:

> I am inclined to think that treating USE_AUSTRALIAN_RULES as a compile
> time option was the wrong idea.  It should be a runtime (GUC) option;
> then it can be switched off to run the regress tests, regardless of
> whether a particular installation keeps it on by default.

Right.  I was in fact inclined to do this for 7.1, but the problem is that
the time zone lookup is driven by a static table, so it would probably
require a bit of uglification to make this work.  But it's surely
feasible.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter