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

pgsql: Fix assorted corner-case bugs in contrib/intarray.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix assorted corner-case bugs in contrib/intarray.
Date: 2011-01-09 05:39:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Fix assorted corner-case bugs in contrib/intarray.

The array containment operators now behave per mathematical expectation
for empty arrays (ie, an empty array is contained in anything).
Both these operators and the query_int operators now work as expected in
GiST and GIN index searches, rather than having corner cases where the
index searches gave different answers.

Also, fix unexpected failures where the operators would claim that an array
contained nulls, when in fact there was no longer any null present (similar
to bug #5784).  The restriction to not have nulls is still there, as
removing it would take a lot of added code complexity and probably slow
things down significantly.

Also, remove the arbitrary restriction to 1-D arrays; unlike the other
restriction, this was buying us nothing performance-wise.

Assorted cosmetic improvements and marginal performance improvements, too.



Modified Files
contrib/intarray/_int.h             |   80 +++++-----
contrib/intarray/_int_bool.c        |  287 ++++++++++-------------------------
contrib/intarray/_int_gin.c         |  122 ++++++++-------
contrib/intarray/_int_gist.c        |   31 ++---
contrib/intarray/_int_op.c          |  109 ++++++--------
contrib/intarray/_int_tool.c        |  115 +++++++-------
contrib/intarray/_intbig_gist.c     |   17 +--
contrib/intarray/uninstall__int.sql |    4 +-
doc/src/sgml/intarray.sgml          |   27 +++-
9 files changed, 332 insertions(+), 460 deletions(-)

pgsql-committers by date

Next:From: Michael MeskesDate: 2011-01-09 12:20:03
Subject: pgsql: There is no need to have to identical functions in ecpg thusrem
Previous:From: Tom LaneDate: 2011-01-09 01:27:27
Subject: pgsql: Add array_contains_nulls() function in arrayfuncs.c.

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