Re: [GENERAL] array weirdity

2009-09-03 Thread Michael Glaesemann
On Sep 3, 2009, at 9:19 , Sim Zacks wrote: How can these both be true? Is there a way to see if a value is not in an array? select 1229 <> any('{1220,0,0,1228,1229,1231,0,0,0}'::int[]) as result result --- t Here you're comparing 1229 to each element in the array in turn, and retu

Re: [GENERAL] array weirdity

2009-09-03 Thread Richard Huxton
Sim Zacks wrote: > How can these both be true? Is there a way to see if a value is not in > an array? > > > select 1229 <> any('{1220,0,0,1228,1229,1231,0,0,0}'::int[]) as result > > result > --- > t Not "any()", "all()" - it *is* different from some of the numbers there. -- Richard Hux