Editorialization of some text discussing 'IS NULL' vs. '= NULL'.
This commit is contained in:
parent
565b4f2de5
commit
ab8faed00d
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.191 2004/03/05 02:41:14 momjian Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.192 2004/03/07 01:01:44 neilc Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -301,20 +301,22 @@ PostgreSQL documentation
|
|||||||
<literal><replaceable>expression</replaceable> = NULL</literal>
|
<literal><replaceable>expression</replaceable> = NULL</literal>
|
||||||
because <literal>NULL</> is not <quote>equal to</quote>
|
because <literal>NULL</> is not <quote>equal to</quote>
|
||||||
<literal>NULL</>. (The null value represents an unknown value,
|
<literal>NULL</>. (The null value represents an unknown value,
|
||||||
and it is not known whether two unknown values are equal.)
|
and it is not known whether two unknown values are equal.) This
|
||||||
|
behavior conforms to the SQL standard.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Some applications may (incorrectly) require that
|
Some applications may expect that
|
||||||
<literal><replaceable>expression</replaceable> = NULL</literal>
|
<literal><replaceable>expression</replaceable> = NULL</literal>
|
||||||
returns true if <replaceable>expression</replaceable> evaluates to
|
returns true if <replaceable>expression</replaceable> evaluates to
|
||||||
the null value. To support these applications, the run-time option
|
the null value. It is highly recommended that these applications
|
||||||
<varname>transform_null_equals</varname> can be turned on (e.g.,
|
be modified to comply with the SQL standard. However, if that
|
||||||
<literal>SET transform_null_equals TO ON;</literal>).
|
cannot be done the <varname>transform_null_equals</varname>
|
||||||
<productname>PostgreSQL</productname> will then convert
|
configuration variable is available. If it is enabled,
|
||||||
<literal>x = NULL</literal> clauses to
|
<productname>PostgreSQL</productname> will convert <literal>x =
|
||||||
<literal>x IS NULL</literal>. This was
|
NULL</literal> clauses to <literal>x IS NULL</literal>. This was
|
||||||
the default behavior in releases 6.5 through 7.1.
|
the default behavior in <productname>PostgreSQL</productname>
|
||||||
|
releases 6.5 through 7.1.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user