|
1 | 1 | <!--
|
2 |
| -$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.40 2001/02/24 18:09:51 petere Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.41 2001/02/25 16:05:21 petere Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <chapter id="sql-syntax">
|
@@ -905,17 +905,17 @@ sqrt(2)
|
905 | 905 | you will sometimes need to add parentheses when using combinations
|
906 | 906 | of binary and unary operators. For instance
|
907 | 907 | <programlisting>
|
908 |
| -SELECT 5 !+ 6; |
| 908 | +SELECT 5 !- 6; |
909 | 909 | </programlisting>
|
910 | 910 | will be parsed as
|
911 | 911 | <programlisting>
|
912 |
| -SELECT 5 ! (+ 6); |
| 912 | +SELECT 5 ! (- 6); |
913 | 913 | </programlisting>
|
914 | 914 | because the parser has no idea -- until it is too late -- that
|
915 | 915 | <token>!</token> is defined as a postfix operator, not an infix one.
|
916 | 916 | To get the desired behavior in this case, you must write
|
917 | 917 | <programlisting>
|
918 |
| -SELECT (5 !)+ 6; |
| 918 | +SELECT (5 !)- 6; |
919 | 919 | </programlisting>
|
920 | 920 | This is the price one pays for extensibility.
|
921 | 921 | </para>
|
|