Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3460181

Browse files
committed
Choose a more suitable example for the operator precedence mis-parsing
example.
1 parent2db9d5e commit3460181

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎doc/src/sgml/syntax.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.39 2001/02/10 07:08:44 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.40 2001/02/24 18:09:51 petere Exp $
33
-->
44

55
<chapter id="sql-syntax">
@@ -905,17 +905,17 @@ sqrt(2)
905905
you will sometimes need to add parentheses when using combinations
906906
of binary and unary operators. For instance
907907
<programlisting>
908-
SELECT 5 !~ 6;
908+
SELECT 5 !+ 6;
909909
</programlisting>
910910
will be parsed as
911911
<programlisting>
912-
SELECT 5 ! (~ 6);
912+
SELECT 5 ! (+ 6);
913913
</programlisting>
914-
because the parser has no idea --- until it'stoo late--- that
915-
<token>!</token> is defined as a postfix operator not an infix one.
914+
because the parser has no idea -- until it istoo late -- that
915+
<token>!</token> is defined as a postfix operator, not an infix one.
916916
To get the desired behavior in this case, you must write
917917
<programlisting>
918-
SELECT (5 !)~ 6;
918+
SELECT (5 !)+ 6;
919919
</programlisting>
920920
This is the price one pays for extensibility.
921921
</para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp