File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- <!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.120 2007/12/11 18:30:20 mha Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.121 2008/01/23 19:51:29 tgl Exp $ -->
22
33<chapter id="sql-syntax">
44 <title>SQL Syntax</title>
@@ -1740,15 +1740,15 @@ SELECT somefunc() OR true;
17401740 used. For example, this is an untrustworthy way of trying to
17411741 avoid division by zero in a <literal>WHERE</> clause:
17421742<programlisting>
1743- SELECT ... WHERE x <& gt; 0 AND y/x > 1.5;
1743+ SELECT ... WHERE x > 0 AND y/x > 1.5;
17441744</programlisting>
17451745 But this is safe:
17461746<programlisting>
1747- SELECT ... WHERE CASE WHEN x <& gt; 0 THEN y/x > 1.5 ELSE false END;
1747+ SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END;
17481748</programlisting>
17491749 A <literal>CASE</> construct used in this fashion will defeat optimization
17501750 attempts, so it should only be done when necessary. (In this particular
1751- example, it would be best to sidestep the problem by writing
1751+ example, it would be better to sidestep the problem by writing
17521752 <literal>y > 1.5*x</> instead.)
17531753 </para>
17541754 </sect2>
You can’t perform that action at this time.
0 commit comments