Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2C2CD632A6C for ; Sun, 19 Apr 2009 22:10:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98105-07 for ; Sun, 19 Apr 2009 22:10:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.61.230.242]) by mail.postgresql.org (Postfix) with ESMTP id 76AE163276A for ; Sun, 19 Apr 2009 22:10:05 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 662FA5C118; Mon, 20 Apr 2009 09:09:59 +0800 (WST) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 3A96A1E0436; Mon, 20 Apr 2009 09:09:59 +0800 (WST) Message-ID: <49EBCB67.5080806@postnewspapers.com.au> Date: Mon, 20 Apr 2009 09:09:59 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: John Lister Cc: pgsql-jdbc@postgresql.org Subject: Re: Unit tests and ordering References: <49E72C90.9010903@enterprisedb.com> <49EB6ABD.7020308@kickstone.com> In-Reply-To: <49EB6ABD.7020308@kickstone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/70 X-Sequence-Number: 19517 John Lister wrote: > 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. > 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. -- Craig Ringer