summaryrefslogtreecommitdiff
path: root/contrib/intarray/expected
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-02-16 20:00:23 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-02-16 20:00:23 -0500
commitf559846a68df902715d05579c800f836b8f7226b (patch)
tree57fde0eb505cc752fe11e7873e9ab367b560959b /contrib/intarray/expected
parentebc37d6924df785f3601f135c9c900fd7ec465c7 (diff)
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.
Diffstat (limited to 'contrib/intarray/expected')
-rw-r--r--contrib/intarray/expected/_int.out6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/intarray/expected/_int.out b/contrib/intarray/expected/_int.out
index 596439d3149..ab28ad33de1 100644
--- a/contrib/intarray/expected/_int.out
+++ b/contrib/intarray/expected/_int.out
@@ -143,6 +143,12 @@ SELECT '{123,623,445}'::int[] & '{1623,623}';
{623}
(1 row)
+SELECT '{-1,3,1}'::int[] & '{1,2}';
+ ?column?
+----------
+ {1}
+(1 row)
+
--test query_int
SELECT '1'::query_int;
query_int