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

From Andrew Martin
Subject [HACKERS] Array bug is still there....
Date
Msg-id 2b14bcb3b900da1045d114b3d4f83a29
Whole thread Raw
List pgsql-hackers
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.

Please make sure that this is in the TODO list and for the next release
it really should be fixed or array functionality disabled.


The current (wrong) expected output is:

QUERY: SELECT * FROM arrtest;
a          |b              |c            |d                |e
- -----------+---------------+-------------+-----------------+-------------
{1,2,3,4,5}|{{{0,0},{1,2}}}|{}           |{}               |
{11,12,23} |{{3,4},{4,5}}  |{"foobar"}   |{{"elt1","elt2"}}|{"3.4","6.7"}
{}         |{3,4}          |{"foo","bar"}|{"bar","foo"}    |


The correct output is:

QUERY: SELECT * FROM arrtest;
a            b                      c              d                  e
- ------------ ---------------------- -------------- ------------------ --------------
{1,2,3,4,5}  {{{0,0}},{{1,2}}}      {}             {}
{11,12,23}   {{{3},{4}},{{4},{5}}}  {"foobar"}     {{"elt1","elt2"}}  {"3.4","6.7"}
{}           {{{3,4},{0,0}}}        {"foo","bar"}  {{"bar"},{"foo"}}



The problem comes in columns b and d which are 3D and 2D arrays.
The wrong output is munging the dimensionality of these arrays.


Surely the CVS logs can tell us where the bug was introduced. I'm
fairly sure it was somewhere between 1.02 and 1.08.


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: Bruce Momjian
Date:
Subject: Re: [HACKERS] Optimizer
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Problem with copying abstimes