]> 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:34 +0000 (20:00 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Feb 2012 01:00:34 +0000 (20:00 -0500)
commitb0e1a4bd5e1d2057d0ddab9b93f2cccb538989dc
tree83565455cee8ba5ca42d817f462c54893762f59b
parent3eb2ff16db00bb1d2bc73a263766b7224e810321
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