Re: Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards
От | Tom Ivar Helbekkmo |
---|---|
Тема | Re: Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards |
Дата | |
Msg-id | 86bsnywuj7.fsf@athene.i.eunet.no обсуждение исходный текст |
Ответ на | Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards (Thomas Lockhart <lockhart@fourpalms.org>) |
Список | pgsql-hackers |
Thomas Lockhart <lockhart@fourpalms.org> writes: > But since the construct is not allowed (or useless), why would > anyone feel they need to use it? Because it isn't entirely useless, actually. I agree that no programmer in his right mind would write, by hand, a comparison involving NULL, knowing that the truth value of that comparison is required by the standard to be UNKNOWN (i.e. NULL). However, I'm looking at using machine generated SQL code (generated on the fly in an interactive application) to implement a dynamically adapting set of tables, rules/triggers and their supporting stored procedures, and it's just a matter of time before the first "= NULL" happens to show up in code generated like that. I'd like it to behave according to the standard when that situation occurs, and the standard says that any comparison with NULL, even "NULL = NULL", is UNKNOWN. -tih -- The basic difference is this: hackers build things, crackers break them.
В списке pgsql-hackers по дате отправления: