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 z2u1d581afe1005091755tadc700f9t53d016183be3b708@mail.gmail.com
Whole thread Raw
In response to Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"  (Ian Barwick <barwick@gmail.com>)
Responses Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"
List pgsql-hackers
2010/5/10 Ian Barwick <barwick@gmail.com>:
> SELECT ov.object_id
>    FROM object_version ov
>   WHERE ov.object_id = 1
>     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';

Apologies, slight c&p error; correct version of query:

SELECT ov.object_id  FROM object_version ov WHERE ov.object_id = 1   AND ov.version =0   AND ov.object_status_id = (
SELECTMAX(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'; 

FWIW the test case works fine in 8.4.3


Ian Barwick


pgsql-hackers by date:

Previous
From: Ian Barwick
Date:
Subject: Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute"
Next
From: Robert Haas
Date:
Subject: Re: max_standby_delay considered harmful