pgsql: Fix longstanding error in contrib/intarray's int[] & int[] opera - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix longstanding error in contrib/intarray's int[] & int[] opera
Date
Msg-id E1RyCC9-0006Mo-Bq@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix longstanding error in contrib/intarray's int[] & int[] operator.

The array intersection code would give wrong results if the first entry of
the correct output array would be "1".  (I think only this value could be
at risk, since the previous word would always be a lower-bound entry with
that fixed value.)

Problem spotted by Julien Rouhaud, initial patch by Guillaume Lelarge,
cosmetic improvements by me.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/81b4e5ceb6904f3d689a694eb72a90b7ea6cd961

Modified Files
--------------
contrib/intarray/_int_tool.c       |   15 +++++++++------
contrib/intarray/expected/_int.out |    6 ++++++
contrib/intarray/sql/_int.sql      |    1 +
3 files changed, 16 insertions(+), 6 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix longstanding error in contrib/intarray's int[] & int[] opera
Next
From: Tom Lane
Date:
Subject: pgsql: Improve statistics estimation to make some use of DISTINCT in su