From: peter.hicks@poggs.co.uk
To: pgsql-bugs@postgresql.org
Subject: BUG #8576: 'btree index keys must be ordered by attribute'
Date: Sat, 02 Nov 2013 15:05:02 +0000
Message-ID: <E1Vccl4-0000CZ-Nv@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 8576
Logged by: Peter Hicks
Email address: peter.hicks@poggs.co.uk
PostgreSQL version: 9.1.10
Operating system: Ubuntu 12.04
Description:
Hello
The SQL code further down allows a btree index to be created with the same
column twice, however no queries are possible on the table and are met with
a "ERROR: XX000: btree index keys must be ordered by attribute".
This problem is reproducible on a newly created database on both 9.1.9 and
9.1.10 (9.1.10-0ubuntu12.04), and isn't present on 9.2.4 (OS X/Homebrew).
It looks like bug #6351
(http://www.postgresql.org/message-id/E1RdRfu-0004E9-8N@wrigleys.postgresql.org)
- was this ever fixed for 9.1.x?
DROP TABLE IF EXISTS scenario;
CREATE TABLE scenario
(
id serial NOT NULL,
f1 character varying(1),
f2 character varying(1)
);
CREATE INDEX index_scenario
ON scenario
USING btree
(f1, f2, f1);
SELECT COUNT(*) FROM scenario WHERE "f1" = 'A' AND "f2" = 'B';
---
Peter
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: peter.hicks@poggs.co.uk
Subject: Re: BUG #8576: 'btree index keys must be ordered by attribute'
In-Reply-To: <E1Vccl4-0000CZ-Nv@wrigleys.postgresql.org>
References: <E1Vccl4-0000CZ-Nv@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox