pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pierre Ducroquet <p.psql@pinaraf.info>
Cc: pgsql-bugs@postgresql.org
Cc: Peter Eisentraut <peter_e@gmx.net>
Subject: Re: BUG #6232: hstore operator ? no longer uses indexes
Date: Wed, 28 Sep 2011 22:42:55 -0400
Message-ID: <13745.1317264175@sss.pgh.pa.us> (raw)
In-Reply-To: <201109282050.p8SKoA4O084649@wwwmaster.postgresql.org>
References: <201109282050.p8SKoA4O084649@wwwmaster.postgresql.org>

"Pierre Ducroquet" <p.psql@pinaraf.info> writes:
> [ the "hstore ? text" operator no longer matches an hstore GIST index ]

Hmm ... this doesn't seem to be specific to either hstore or GIST; it's
a collation problem.  The index is marked as having no collation, which
is reasonable since hstore is a collation-less type.  However, the ?
OpExpr gets marked as having "default" collation because it has one
collatable input, namely the text constant.  And then,
match_clause_to_indexcol decides the clause doesn't match the index.

Not sure what to do about this.  Is it okay to suppose that collation
can be ignored when matching to a collation-less index?  If not, what's
the correct rule?  I don't like the idea of concluding that hstore has
to be forcibly assigned a collation just because it has some operators
that accept text ...

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <13745.1317264175@sss.pgh.pa.us>
Permalink:  ../13745.1317264175@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13745.1317264175@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, p.psql@pinaraf.info, peter_e@gmx.net
  Subject: Re: BUG #6232: hstore operator ? no longer uses indexes
  In-Reply-To: <13745.1317264175@sss.pgh.pa.us>
  References: <201109282050.p8SKoA4O084649@wwwmaster.postgresql.org> <13745.1317264175@sss.pgh.pa.us>

* 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