Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcjK3-0001Ym-Gr for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Nov 2013 22:05:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VcjK2-0001Fm-0i for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Nov 2013 22:05:34 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcclF-0007Dj-Ub for pgsql-bugs@postgresql.org; Sat, 02 Nov 2013 15:05:14 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcclB-0004qz-BD for pgsql-bugs@postgresql.org; Sat, 02 Nov 2013 15:05:13 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcclA-00073V-Jl for pgsql-bugs@postgresql.org; Sat, 02 Nov 2013 15:05:09 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1Vccl4-0000CZ-Nv for pgsql-bugs@postgresql.org; Sat, 02 Nov 2013 15:05:02 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8576: 'btree index keys must be ordered by attribute' To: pgsql-bugs@postgresql.org From: peter.hicks@poggs.co.uk Message-Id: Date: Sat, 02 Nov 2013 15:05:02 +0000 X-Pg-Spam-Score: -0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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