Tom Lane wrote:
> That's exactly why we need a more thorough regression test. The core
> developers aren't doing much with the geometry operations, and evidently
> neither are any of the frontline beta testers. So, if the regression
> tests don't cover the material either, we stand a good chance of
> breaking things and not even knowing it --- which is exactly what
> happened here.
>
> It seems that you do make use of the geometry operations; perhaps
> you would be willing to work up some more-thorough regression tests?
> You're certainly better qualified to do it than I am...
>
well, depending on how complete you want the regression tests, this
could be fairly easy. after a quick look at the tests, it seems like
the only type that is really left out is line (which i don't know if
there are any native operators for it anyway, all i know about are the
ones for lsegs). just a simple select for the forgotten operators in
with the test of other operators for each type would be an improvement.
i think all of the functions are covered in at least one place. again,
though, i think everything that i use on a regular basis is covered in
the regression test. so overall it's really not that bad. except, of
course, for the bug i uncovered. there actually is a place where an
rtree index is created, but nothing is every selected against it, which
is what caused this error to go unnoticed. i haven't looked closely
enough at parts of the other regression tests to see if there are any
selects where indexes come in to play, but it'd be a good idea to make
sure indexes are actually used in the tests for all access methods (and
op classes? - i can't really imagine when this would be a problem, but
who knows).
i'll try updating some of the dedicated tests (box.sql, circle.sql,
geometry.sql, lseg.sql, path.sql, polygon.sql), but i'm not sure where
testing the rtree indexes should go. i think other index types are
tested in select.sql, but i'd probably put them in geometry.sql. does
anybody care? is there someone that oversees the methods and
organization of the regression tests or do people just throw in new
tests when there's something new?