Re: [HACKERS] Array bug is still there.... - Mailing list pgsql-hackers

From Andrew Martin
Subject Re: [HACKERS] Array bug is still there....
Date
Msg-id df80023693f9f2a6b1a29a70654328ed
Whole thread Raw
In response to [HACKERS] Array bug is still there....  (Andrew Martin <martin@biochemistry.ucl.ac.uk>)
List pgsql-hackers
> Andrew Martin wrote:
> >
> > Just run the regression tests on 6.1 and as I suspected the array bug
> > is still there. The regression test passes because the expected output
> > has been fixed to the *wrong* output.
> >
> > As I have said before, I don't use arrays, so this doesn't affect me,
> > but it is very bad practice that this should be released with the
> > regression tests claiming that arrays work when they don't.
>
> >From the regression test README:
>
>   The interpretation of array specifiers (the curly braces around atomic
>   values) appears to have changed sometime after the original regression
>   tests were generated. The current ./expected/*.out files reflect this
>   new interpretation, which may not be correct!

I'm sure it is not correct! In the example below, `b' is defined as a
3-dimensional array. From the old output, you could clearly see that it
had 3 dimensions in all rows, now you can't. Obviously that is wrong...

>
> It seems to me to be *pointless* to carry forward long-term behavior as
> a failure for regression testing when the regression testing really is
> designed to ensure that behavior is consistant and that a new
> installation is functioning "properly", which means that it behaves as
> well as a reference installation behaves.

I believe that is a minor role for regression tests. Their primary role
is for *developers* to check that their changes haven't broken anything.
Installers/users shouldn't really need them other than as a check that
they haven't done anything completely stupid during the installation.

Incidently, the new style regression tests are excellent. *Much much*
better than the old ones :-)


> Don't know who uses arrays,
> but it apparently isn't anyone who cares enough to try fixing the
> problem.

I agree. I've never used them and don't know anyone who has. My point
is that if this is a feature we are keeping then it should work
properly. If not, then it could be dumped like time travel, but I'm
sure there must be some people out there somewhere who do use it :-)

>
> (OK, I feel better now :)
>
> Do you actually understand how the array output is supposed to look?
Yes! Look in the old regression test expected output...

> Since no versions of the code do it "correctly", I've been confused as
> to what the array rules really are.
Huh? It certainly used to work in the Andrew & Jolly days and I'm sure
it worked for a while while under the net-development team. As I said
earlier, it broke somewhere between 1.02 and 1.08


> Is the stuff munged internally, or
> only for output?? Wouldn't mind working on it but need to understand the
> correct behavior first...
I don't know where it got broken, but it must be traceable from the
CVS logs...



Best wishes,

Andrew

- ----------------------------------------------------------------------------
Dr. Andrew C.R. Martin                             University College London
EMAIL: (Work) martin@biochem.ucl.ac.uk    (Home) andrew@stagleys.demon.co.uk
URL:   http://www.biochem.ucl.ac.uk/~martin
Tel:   (Work) +44(0)171 419 3890                    (Home) +44(0)1372 275775

------------------------------

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] problems with sunos4 port, endian?
Next
From: Ronald Baljeu
Date:
Subject: Re: [HACKERS] Problem with copying abstimes