Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3460181c
Commit
3460181c
authored
24 years ago
by
Peter Eisentraut
Browse files
Options
Downloads
Patches
Plain Diff
Choose a more suitable example for the operator precedence mis-parsing
example.
parent
2db9d5e5
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/syntax.sgml
+6
-6
6 additions, 6 deletions
doc/src/sgml/syntax.sgml
with
6 additions
and
6 deletions
doc/src/sgml/syntax.sgml
+
6
−
6
View file @
3460181c
<!--
$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
i
s 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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment