[postgis-devel] Small regression test updates
Andreas 'ads' Scherbaum
adsmail at wars-nicht.de
Wed Oct 20 01:50:26 PDT 2010
Hi,
Am 20.07.2011 10:37, schrieb Sandro Santilli:
> On Wed, Jul 20, 2011 at 10:33:30AM +0200, Andreas 'ads' Scherbaum wrote:
>
> I know, but how does that give an actually predictable order ?
> Isn't this just exploiting a PostgreSQL implementation detail ?
How so?
The regression tests run a single SELECT which returns one or more rows,
but every time only a single column.
Right now the sort order of the rows is not predictable. Most of the
time you end up with the expected order, but this is not guaranteed by
the database. As mentioned in my initial mail, we run into the problem
that we don't see the same order every time we run the regression tests
- in our distributed environment the resulting rows come from different
PostgreSQL nodes and are not sorted in any way. Which node is faster
ends up delivering the first row for the result set.
My patch changes this by applying a sort order. Every time the
regression tests run with the "order by", the database sorts the results
and you are guaranteed to get the same order - given the fact, that
everything works well and you actually get the same data back from the
SELECT.
What I do is using the column number in my patch instead of the column
name - which is valid according to the SQL spec. This is nothing
specific to PostgreSQL, it works in other databases too.
Regards,
--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project
More information about the postgis-devel
mailing list