Fix longstanding error in contrib/intarray's int[] & int[] operator.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Feb 2012 01:00:17 +0000 (20:00 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Feb 2012 01:00:17 +0000 (20:00 -0500)
commit86328cbc348a6c2614bd1fddbf21380a92417e04
tree6071be94293acc0eb28887d0b5ee5aa8faefb731
parent04a0231e56c4f401b681fe8a87829b4d11cd18ce
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.
contrib/intarray/_int_tool.c
contrib/intarray/expected/_int.out
contrib/intarray/sql/_int.sql