Re: Bug #765: 'IS NULL' versus '= NULL'
От | Hubert depesz Lubaczewski |
---|---|
Тема | Re: Bug #765: 'IS NULL' versus '= NULL' |
Дата | |
Msg-id | 20020914120800.GB32506@depesz.pl обсуждение исходный текст |
Ответ на | Bug #765: 'IS NULL' versus '= NULL' (pgsql-bugs@postgresql.org) |
Список | pgsql-bugs |
On Sat, Sep 14, 2002 at 04:43:15AM -0400, pgsql-bugs@postgresql.org wrote: > Eventhough my_table contain a record with id as null, the last 2 sqls > are not resulting that record. Why? Maybe my understanding would be > wrong on this behaviour, if so please kindly apologize and give some > description on this difference, since i dont have answer in the > documentation. afaik: according to sql documentation (and implementations different that postgresql), any comparison where one of values is null should yield "null" as response. is means, that NULL =3D NULL gives you "null" instead of "true", and if you want this kind of checks you have to use "is null" operator. postgresql used to process "NULL =3D NULL" as true, but it was changed to conform with standard and typical implementations in ohter databases. best regards depesz --=20 hubert depesz lubaczewski http://www.depesz.pl/ ------------------------------------------------------------------------ M=F3j Bo=BFe, spraw abym milcza=B3, dop=F3ki si=EA nie upewni=EA, =BFe na= prawd=EA mam co=B6 do powiedzenia. (c) 1998 depesz
В списке pgsql-bugs по дате отправления: