]> granicus.if.org Git - postgresql/commit
Fix longstanding error in contrib/intarray's int[] & int[] operator.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Feb 2012 01:00:11 +0000 (20:00 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Feb 2012 01:00:11 +0000 (20:00 -0500)
commit06d9afa6f93ec08a45da4de7afd97bbf16738739
tree2c9776a5c070be13f4a3a0c4c61c0c935c620449
parent4767bc8ff2edc1258cf4d8a83155d4cedd724231
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