Skip site navigation (1) Skip section navigation (2)

pgsql: Remove assumptions that not-equals operators cannot be in anyop

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove assumptions that not-equals operators cannot be in anyop
Date: 2011-07-06 18:53:55
Message-ID: E1QeXER-0004TF-0h@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Remove assumptions that not-equals operators cannot be in any opclass.

get_op_btree_interpretation assumed this in order to save some duplication
of code, but it's not true in general anymore because we added <> support
to btree_gist.  (We still assume it for btree opclasses, though.)

Also, essentially the same logic was baked into predtest.c.  Get rid of
that duplication by generalizing get_op_btree_interpretation so that it
can be used by predtest.c.

Per bug report from Denis de Bernardy and investigation by Jeff Davis,
though I didn't use Jeff's patch exactly as-is.

Back-patch to 9.1; we do not support this usage before that.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/cb1cc305bc349338f75a549c36041b4c91cf779f

Modified Files
--------------
src/backend/optimizer/util/predtest.c |  191 +++++++++++----------------------
src/backend/parser/parse_expr.c       |   26 +++---
src/backend/utils/cache/lsyscache.c   |   97 ++++++++++-------
src/include/utils/lsyscache.h         |   12 ++-
4 files changed, 145 insertions(+), 181 deletions(-)

pgsql-committers by date

Next:From: Andrew DunstanDate: 2011-07-06 22:54:06
Subject: pgsql: Reimplement pgbison and pgflex as perl scripts instead of batfi
Previous:From: Tom LaneDate: 2011-07-06 18:53:54
Subject: pgsql: Remove assumptions that not-equals operators cannot be in anyop

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group