Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c3641483
Commit
c3641483
authored
Dec 14, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge functions and operators chapters. Lots of updates.
parent
ea166f11
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1950 additions
and
1626 deletions
+1950
-1626
doc/src/sgml/Makefile
doc/src/sgml/Makefile
+2
-1
doc/src/sgml/datatype.sgml
doc/src/sgml/datatype.sgml
+2
-3
doc/src/sgml/filelist.sgml
doc/src/sgml/filelist.sgml
+1
-2
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+1767
-742
doc/src/sgml/oper.sgml
doc/src/sgml/oper.sgml
+0
-867
doc/src/sgml/syntax.sgml
doc/src/sgml/syntax.sgml
+176
-8
doc/src/sgml/user.sgml
doc/src/sgml/user.sgml
+2
-3
No files found.
doc/src/sgml/Makefile
View file @
c3641483
...
...
@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.2
6 2000/11/24 17:44:21
petere Exp $
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.2
7 2000/12/14 22:30:56
petere Exp $
#
#----------------------------------------------------------------------------
...
...
@@ -16,6 +16,7 @@ subdir = doc/src/sgml
top_builddir
=
../../..
include
$(top_builddir)/src/Makefile.global
.SECONDARY
:
ifndef
DOCBOOKSTYLE
DOCBOOKSTYLE
=
/home/projects/pgsql/developers/thomas/db143.d/docbook
...
...
doc/src/sgml/datatype.sgml
View file @
c3641483
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.4
3 2000/12/03 14:47:18 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.4
4 2000/12/14 22:30:56 petere
Exp $
-->
<chapter id="datatype">
...
...
@@ -349,8 +349,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.43 2000/12/03 14:47:18 th
<para>
The numeric types have a full set of corresponding arithmetic operators and
functions. Refer to <xref linkend="numerical-operators">
and <xref linkend="math-functions"> for more information.
functions. Refer to <xref linkend="functions"> for more information.
</para>
<para>
...
...
doc/src/sgml/filelist.sgml
View file @
c3641483
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/filelist.sgml,v 1.
1 2000/11/24 17:44:21
petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/filelist.sgml,v 1.
2 2000/12/14 22:30:56
petere Exp $ -->
<!entity about SYSTEM "about.sgml">
<!entity history SYSTEM "history.sgml">
...
...
@@ -26,7 +26,6 @@
<!entity inherit SYSTEM "inherit.sgml">
<!entity manage SYSTEM "manage.sgml">
<!entity mvcc SYSTEM "mvcc.sgml">
<!entity oper SYSTEM "oper.sgml">
<!entity plan SYSTEM "plan.sgml">
<!entity plperl SYSTEM "plperl.sgml">
<!entity plsql SYSTEM "plsql.sgml">
...
...
doc/src/sgml/func.sgml
View file @
c3641483
This diff is collapsed.
Click to expand it.
doc/src/sgml/oper.sgml
deleted
100644 → 0
View file @
ea166f11
This diff is collapsed.
Click to expand it.
doc/src/sgml/syntax.sgml
View file @
c3641483
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.2
5 2000/09/29 20:21:34
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.2
6 2000/12/14 22:30:56
petere Exp $
-->
<chapter id="syntax">
...
...
@@ -656,7 +656,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
<para>
Any built-in system, or user-defined operator may be used in SQL.
For the list of built-in and system operators consult
<xref linkend="
operators" endterm="operators-title
">.
<xref linkend="
functions
">.
For a list of user-defined operators consult your system administrator
or run a query on the <literal>pg_operator</literal> class.
Parentheses may be used for arbitrary grouping of operators in expressions.
...
...
@@ -669,10 +669,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
<para>
<acronym>SQL92</acronym> allows <firstterm>expressions</firstterm>
to transform data in tables. Expressions may contain operators
(see <xref linkend="operators" endterm="operators-title">
for more details) and functions
(<xref linkend="functions" endterm="functions-title"> has
more information).
and functions.
</para>
<para>
...
...
@@ -749,8 +746,8 @@ sqrt(emp.salary)
</para>
</sect2>
<sect2>
<title
id="aggregates-syntax"
>Aggregate Expressions</title>
<sect2
id="syntax-aggregates"
>
<title>Aggregate Expressions</title>
<para>
An <firstterm>aggregate expression</firstterm> represents the application
...
...
@@ -863,6 +860,177 @@ sqrt(emp.salary)
before the classname.
</para>
</sect2>
<sect2 id="sql-precedence">
<title>Lexical Precedence</title>
<para>
The precedence and associativity of the operators is hard-wired
into the parser. Most operators have the same precedence and are
left-associative. This may lead to non-intuitive behavior; for
example the boolean operators "<" and ">" have a different
precedence than the boolean operators "<=" and ">=". Also,
you will sometimes need to add parenthesis when using combinations
of binary and unary operators. For instance
<programlisting>
SELECT 5 & ~ 6;
</programlisting>
will be parsed as
<programlisting>
SELECT (5 &) ~ 6;
</programlisting>
because the parser has no idea that <token>&</token> is
defined as a binary operator. This is the price one pays for
extensibility.
</para>
<table tocentry="1">
<title>Operator Ordering (decreasing precedence)</title>
<tgroup cols="2">
<thead>
<row>
<entry>OperatorElement</entry>
<entry>Associativity</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><token>::</token></entry>
<entry>left</entry>
<entry><productname>Postgres</productname>-style typecast</entry>
</row>
<row>
<entry><token>[</token> <token>]</token></entry>
<entry>left</entry>
<entry>array element selection</entry>
</row>
<row>
<entry><token>.</token></entry>
<entry>left</entry>
<entry>table/column name separator</entry>
</row>
<row>
<entry><token>-</token></entry>
<entry>right</entry>
<entry>unary minus</entry>
</row>
<row>
<entry><token>^</token></entry>
<entry>left</entry>
<entry>exponentiation</entry>
</row>
<row>
<entry><token>*</token> <token>/</token> <token>%</token></entry>
<entry>left</entry>
<entry>multiplication, division, modulo</entry>
</row>
<row>
<entry><token>+</token> <token>-</token></entry>
<entry>left</entry>
<entry>addition, subtraction</entry>
</row>
<row>
<entry><token>IS</token></entry>
<entry></entry>
<entry>test for TRUE, FALSE, NULL</entry>
</row>
<row>
<entry><token>ISNULL</token></entry>
<entry></entry>
<entry>test for NULL</entry>
</row>
<row>
<entry><token>NOTNULL</token></entry>
<entry></entry>
<entry>test for NOT NULL</entry>
</row>
<row>
<entry>(any other)</entry>
<entry>left</entry>
<entry>all other native and user-defined operators</entry>
</row>
<row>
<entry><token>IN</token></entry>
<entry></entry>
<entry>set membership</entry>
</row>
<row>
<entry><token>BETWEEN</token></entry>
<entry></entry>
<entry>containment</entry>
</row>
<row>
<entry><token>OVERLAPS</token></entry>
<entry></entry>
<entry>time interval overlap</entry>
</row>
<row>
<entry><token>LIKE</token> <token>ILIKE</token></entry>
<entry></entry>
<entry>string pattern matching</entry>
</row>
<row>
<entry><token><</token> <token>></token></entry>
<entry></entry>
<entry>less than, greater than</entry>
</row>
<row>
<entry><token>=</token></entry>
<entry>right</entry>
<entry>equality, assignment</entry>
</row>
<row>
<entry><token>NOT</token></entry>
<entry>right</entry>
<entry>logical negation</entry>
</row>
<row>
<entry><token>AND</token></entry>
<entry>left</entry>
<entry>logical conjunction</entry>
</row>
<row>
<entry><token>OR</token></entry>
<entry>left</entry>
<entry>logical disjunction</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
Note that the operator precedence rules also apply to user-defined
operators that <quote>look like</quote> the built-in operators
with special treatment. For example, if you define a
<quote>+</quote> operator for some custom data type it will have
the same precedence as the built-in <quote>+</quote> operator, no
matter what yours does.
</para>
</sect2>
</sect1>
</chapter>
...
...
doc/src/sgml/user.sgml
View file @
c3641483
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.2
0 2000/11/24 17:44:22
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.2
1 2000/12/14 22:30:56
petere Exp $
-->
<book id="user">
...
...
@@ -45,11 +45,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.20 2000/11/24 17:44:22
&intro;
&syntax;
&datatype;
&oper;
&func;
&typeconv;
&indices;
&array;
&indices;
&inherit;
&plsql;
&pltcl;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment