pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Manuel Rigger <rigger.manuel@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: SELECT results in "ERROR: index key does not match expected index column"
Date: Wed, 03 Jul 2019 03:44:08 +0100
Message-ID: <87tvc3q1ob.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <17559.1562107820@sss.pgh.pa.us>
References: <CA+u7OA4CV21mUfwjQj3va7MWvqB2EAdJT31=uf_yArBRVzQjYw@mail.gmail.com>
	<17559.1562107820@sss.pgh.pa.us>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> (You realize of course that an index on a constant is pretty
 Tom> useless. I wonder if we should disallow that.)

Unique index on a constant is a standard technique for forcing a table
to be limited to at most one row (or with a partial index, at most one
row matching a condition). Non-unique index on a constant is probably
not useful though.

-- 
Andrew (irc:RhodiumToad)





view thread (8+ messages)  latest in thread

Message-ID: <87tvc3q1ob.fsf@news-spur.riddles.org.uk>
Permalink:  ../87tvc3q1ob.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87tvc3q1ob.fsf@news-spur.riddles.org.uk

 · 

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: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, rigger.manuel@gmail.com
  Subject: Re: SELECT results in "ERROR: index key does not match expected index column"
  In-Reply-To: <87tvc3q1ob.fsf@news-spur.riddles.org.uk>
  References: <CA+u7OA4CV21mUfwjQj3va7MWvqB2EAdJT31=uf_yArBRVzQjYw@mail.gmail.com> <17559.1562107820@sss.pgh.pa.us> <87tvc3q1ob.fsf@news-spur.riddles.org.uk>

* 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