2010/5/9 David Fetter <da...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to