Re: [BUGS] in(NULL)

2002-05-23 Thread Jean-Luc Lachance
Jose, First, do not waste your time comparing PG to MySql: MySql IS NOT SQL! Second, any operation on NULL is NULL. Third, no set can include NULL. You want to rewrite your query as: select * from t where b in (11,22) or b is null; jose wrote: > > Hi all, > > I think I found a bug using the I

Re: [BUGS] in(NULL)

2002-05-23 Thread Tom Lane
jose <[EMAIL PROTECTED]> writes: > I think I found a bug using the IN operator. > select * from t where b not in (11,22,NULL); This is not a bug. The behavior of NOT IN with NULLs is not very intuitive but it is correct according to the SQL standard. The result can only be FALSE (when b is 11 o

Re: [BUGS] in(NULL)

2002-05-23 Thread Joel Burton
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of jose > Sent: Wednesday, May 22, 2002 9:38 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: [BUGS] in(NULL) > > > Hi all, > > I think I found a bug u

[BUGS] in(NULL)

2002-05-23 Thread jose
Hi all, I think I found a bug using the IN operator. I have a table t populated as follow: a | b ---+ 1 | 11 2 | 22 3 | 33 4 | NULL (4 rows) select * from t where b in (11,22,NULL); a | b ---+ 1 | 11 2 | 22 (2 rows) select * from t where b not in (11,22,NULL); a | b ---+