Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute" - Mailing list pgsql-hackers

From Ian Barwick
Subject Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"
Date
Msg-id m2n1d581afe1005090820i142e7f59t8ea60806f2ab64ea@mail.gmail.com
Whole thread Raw
In response to Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"  (David Fetter <david@fetter.org>)
Responses Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"
List pgsql-hackers
2010/5/9 David Fetter <david@fetter.org>:
> On Sun, May 09, 2010 at 05:48:27PM +0900, Ian Barwick wrote:
>> Hi
>>
>> I've just compiled the 9.0 beta1 source tarball and am testing my
>> custom application against it (which has been running on PostgreSQL
>> since 7.3 or so).
>>
>> The below statement results in the following error message:
>>
>>   "ERROR:  btree index keys must be ordered by attribute"
>>
>> evidently in relation to the subselect. The statement works fine on
>> previous versions up to 8.4.3. I can provide more details later if
>> required:
>
> A self-contained way to reproduce this, ideally small, would be
> fantastic :)

Unfortunately I'm a bit pressed for time right now :(, however
in the meantime I have confirmed the same error crops up on OS X 10.5
and also with the query pruned to reference just one table:
  SELECT ov.object_id    FROM object_version ov   WHERE ov.object_id = '3143'     AND ov.version = '0'     AND
ov.object_status_id= (     SELECT MAX(ov1.object_status_id)       FROM object_version ov1      WHERE
ov1.object_id=ov.object_id       AND ov1.version = ov.version        AND ov1.lang = ov.lang       )     AND ov.lang =
'en';

PostgreSQL 9.0beta1 on i386-apple-darwin9.8.0, compiled by GCC
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465),
32-bit

I will see if I can knock together a reproducible test case, might
take a day or so. At the moment all I can report is that creating a reduced
version of the "object_version" table in a fresh DB with no data does
not reproduce the error when running the above query.


Ian Barwick


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"
Next
From: Tom Lane
Date:
Subject: Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"