BUG #6351: ERROR: btree index keys must be ordered by attribute

From: christian_oederan(at)gmx(dot)de
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6351: ERROR: btree index keys must be ordered by attribute
Date: 2011-12-21 19:18:02
Message-ID: E1RdRfu-0004E9-8N@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 6351
Logged by: Christian Rudolph
Email address: christian_oederan(at)gmx(dot)de
PostgreSQL version: 9.0.6
Operating system: openSUSE
Description:

Hi,

our OR-Mapper accidently created an index that contained the same column
twice, with the result that some SELECTs could not be executed anymore and
gave the error message "btree index keys must be ordered by attribute".

The problem can be reproduced with a new table every time:

CREATE TABLE tab (id SERIAL, a INTEGER, b INTEGER);
CREATE INDEX tab123 ON tab (a, b, a);
SELECT a, b FROM tab WHERE a = 0 AND b = 0;

ERROR: XX000: btree index keys must be ordered by attribute
LOCATION: _bt_preprocess_keys, nbtutils.c:322

For me the error occured without inserting any rows.

The database was compiled from source using the switches --with-tcl
--with-perl and --with-python.

SELECT version();
PostgreSQL 9.0.6 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.2.1 (SUSE
Linux), 32-bit

Thanks,
Christian

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message l 2011-12-21 21:21:03 Re: BUG #6204: Using plperl functions generate crash
Previous Message Tom Lane 2011-12-21 17:36:30 Re: BUG #6350: Delete a role which is still in use