Re: BUG #13289: ANY() function produces a paradox

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: udtelco(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13289: ANY() function produces a paradox
Date: 2015-05-15 04:54:16
Message-ID: 5255.1431665656@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

udtelco(at)gmail(dot)com writes:
> select ('2' != any('{2,3}')) , ('2' = any('{2,3}'))

> When != (or <>) operator is applied to any() , results are wrong. Thereby,
> you have a situation where x = y AND x != y both evaluating as true.

Looks fine to me. '2' is equal to at least one of the array elements
(namely '2'), and it's also not equal to at least one of the array
elements (namely '3').

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-05-15 05:01:15 Re: BUG #13289: ANY() function produces a paradox
Previous Message David Gould 2015-05-14 20:23:24 Re: BUG #13286: Core dumped during pg_terminate_backend call.