diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2001-02-24 18:09:51 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2001-02-24 18:09:51 +0000 |
commit | 3460181c3c571d690576c1d7621abfbd78861112 (patch) | |
tree | 6c1e676342648b1c820da36ba0372c9182311c95 /doc/src | |
parent | 2db9d5e53a15551b2a04fcb367598b86f08d96d7 (diff) | |
download | postgresql-3460181c3c571d690576c1d7621abfbd78861112.tar.gz postgresql-3460181c3c571d690576c1d7621abfbd78861112.zip |
Choose a more suitable example for the operator precedence mis-parsing
example.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/syntax.sgml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index cd463488fb6..181d113a415 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.39 2001/02/10 07:08:44 tgl Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.40 2001/02/24 18:09:51 petere Exp $ --> <chapter id="sql-syntax"> @@ -905,17 +905,17 @@ sqrt(2) you will sometimes need to add parentheses when using combinations of binary and unary operators. For instance <programlisting> -SELECT 5 ! ~ 6; +SELECT 5 ! + 6; </programlisting> will be parsed as <programlisting> -SELECT 5 ! (~ 6); +SELECT 5 ! (+ 6); </programlisting> - because the parser has no idea --- until it's too late --- that - <token>!</token> is defined as a postfix operator not an infix one. + because the parser has no idea -- until it is too late -- that + <token>!</token> is defined as a postfix operator, not an infix one. To get the desired behavior in this case, you must write <programlisting> -SELECT (5 !) ~ 6; +SELECT (5 !) + 6; </programlisting> This is the price one pays for extensibility. </para> |