pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: christian_oederan@gmx.de
To: pgsql-bugs@postgresql.org
Subject: BUG #6351: ERROR:  btree index keys must be ordered by attribute
Date: Wed, 21 Dec 2011 19:18:02 +0000
Message-ID: <E1RdRfu-0004E9-8N@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      6351
Logged by:          Christian Rudolph
Email address:      christian_oederan@gmx.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




view thread (3+ messages)  latest in thread

Message-ID: <E1RdRfu-0004E9-8N@wrigleys.postgresql.org>
Permalink:  ../E1RdRfu-0004E9-8N@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1RdRfu-0004E9-8N@wrigleys.postgresql.org

 · 

reply

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: christian_oederan@gmx.de
  Subject: Re: BUG #6351: ERROR:  btree index keys must be ordered by attribute
  In-Reply-To: <E1RdRfu-0004E9-8N@wrigleys.postgresql.org>
  References: <E1RdRfu-0004E9-8N@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