From: | Ian Barwick <barwick(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute" |
Date: | 2010-05-10 00:55:13 |
Message-ID: | z2u1d581afe1005091755tadc700f9t53d016183be3b708@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/5/10 Ian Barwick <barwick(at)gmail(dot)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 = (
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';
FWIW the test case works fine in 8.4.3
Ian Barwick
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-05-10 00:56:09 | Re: max_standby_delay considered harmful |
Previous Message | Ian Barwick | 2010-05-10 00:46:48 | Re: 9.0b1: "ERROR: btree index keys must be ordered by attribute" |