From: John Lister <john.lister-ps@kickstone.com>
To: Craig Ringer <craig@postnewspapers.com.au>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Unit tests and ordering
Date: Mon, 20 Apr 2009 09:47:55 +0100
Message-ID: <D224EADFF0F2461B95D30BEDAB54564A@squarepi.com> (raw)
References: <49E72C90.9010903@enterprisedb.com>
<49EB6ABD.7020308@kickstone.com>
<49EBCB67.5080806@postnewspapers.com.au>
>> This seems to be an ordering problem.. The dates are inserted and then
>> the test relies on them being returned in the same order they were
>> inserted. I'm fairly sure that this isn't guaranteed when using SQL,
>
> Correct. Your tests are broken, you REALLY need an ORDER BY clause if you
> depend on the order of the result set. Alternately, adjust your tests to
> not care about the result set order.
I thought so...
>> however it looks like it probably worked before.
>
> The only major change I can personally think of that might've affected
> that is synchronized scans. If you have more than one backend reading the
> table at once using a sequential scan, one of them will usually pick up
> part-way through the table then go back to the beginning once it hits the
> end. I'm not sure if that's likely to be related to what you're seeing.
>
> In any case, you REALLY need an appropriate ORDER BY clause.
It should be simple to correct the tests, by adding a serial id field and
ordering on that...
Thanks
JOHN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: john.lister-ps@kickstone.com, craig@postnewspapers.com.au
Subject: Re: Unit tests and ordering
In-Reply-To: <D224EADFF0F2461B95D30BEDAB54564A@squarepi.com>
References: <49E72C90.9010903@enterprisedb.com> <49EB6ABD.7020308@kickstone.com> <49EBCB67.5080806@postnewspapers.com.au> <D224EADFF0F2461B95D30BEDAB54564A@squarepi.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox