Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3766e99

Browse files
committed
Add a note that AND and OR are commutative. Apparently, they are not in
certain other products.
1 parent 4c3c8c0 commit 3766e99

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

doc/src/sgml/func.sgml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.163 2003/07/31 22:17:11 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.164 2003/08/04 14:00:13 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -162,6 +162,14 @@ PostgreSQL documentation
162162
</tgroup>
163163
</informaltable>
164164
</para>
165+
166+
<para>
167+
The operators <literal>AND</literal> and <literal>OR</literal> are
168+
commutative, that is, you can switch the left and right operand
169+
without affecting the result. But see <xref
170+
linkend="syntax-express-eval"> for more information about the
171+
order of evaluation of subexpressions.
172+
</para>
165173
</sect1>
166174

167175
<sect1 id="functions-comparison">

doc/src/sgml/syntax.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.79 2003/06/19 23:22:40 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.80 2003/08/04 14:00:14 petere Exp $
33
-->
44

55
<chapter id="sql-syntax">
@@ -1216,7 +1216,7 @@ SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name)
12161216
</para>
12171217
</sect2>
12181218

1219-
<sect2>
1219+
<sect2 id="syntax-express-eval">
12201220
<title>Expression Evaluation</title>
12211221

12221222
<para>

0 commit comments

Comments
 (0)