On 16/07/18 04:40, David Fetter wrote:
Folks,
Per a discussion with Andrew Gierth and Vik Fearing, both of whom
helped make this happen, please find attached a patch which makes it
possible to get SQL standard behavior for "= NULL", which is an error.
It's been upgraded to a warning, and can still be downgraded to
silence (off) and MS-SQL-compatible behavior (on).
I don't agree with changing the default to 'warn'. "foo = NULL" is
perfectly legal SQL, even if it's not very useful in practice.
The use case for transform_null_equals='warn' that I see is to wean off
an application that uses transform_null_equals='on', to find all the
queries that rely on it. But I'm not too excited about that either. The
documented case for using transform_null_equals='on' is compatibility
with Microsoft Access, and this wouldn't help with that. Besides, it's
easy enough to grep the application or the server log for " = NULL", to
find all such queries.
- Heikki