Commit ab8faed0 authored by Neil Conway's avatar Neil Conway

Editorialization of some text discussing 'IS NULL' vs. '= NULL'.

parent 565b4f2d
<!-- <!--
$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 ...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment