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
a4a5f562
Commit
a4a5f562
authored
25 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Add mention of FOR UPDATE and LIMIT/OFFSET>
parent
e1ea7cc2
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/sgml/ref/select.sgml
+13
-0
13 additions, 0 deletions
doc/src/sgml/ref/select.sgml
src/bin/psql/psqlHelp.h
+4
-2
4 additions, 2 deletions
src/bin/psql/psqlHelp.h
src/man/select.l
+10
-2
10 additions, 2 deletions
src/man/select.l
with
27 additions
and
4 deletions
doc/src/sgml/ref/select.sgml
+
13
−
0
View file @
a4a5f562
...
@@ -26,6 +26,8 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
...
@@ -26,6 +26,8 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
[ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
[ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
[ { UNION [ALL] | INTERSECT | EXCEPT } <replaceable class="PARAMETER">select</replaceable> ]
[ { UNION [ALL] | INTERSECT | EXCEPT } <replaceable class="PARAMETER">select</replaceable> ]
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
[ FOR UPDATE [OF class_name...]]
[ LIMIT count [OFFSET|, count]]
</synopsis>
</synopsis>
<refsect2 id="R2-SQL-SELECT-1">
<refsect2 id="R2-SQL-SELECT-1">
...
@@ -242,6 +244,15 @@ including duplicates.</para>
...
@@ -242,6 +244,15 @@ including duplicates.</para>
The EXCEPT give you the rows in the upper query not in the lower query.
The EXCEPT give you the rows in the upper query not in the lower query.
(See EXCEPT clause).</para>
(See EXCEPT clause).</para>
<para>
The FOR UPDATE clause allows the SELECT statement to perform
exclusive locking of selected rows.
(See EXCEPT clause).</para>
<para>
The LIMIT...OFFSET clause allows control over which rows are
returned by the query.</para>
<para>
<para>
You must have SELECT privilege to a table to read its values
You must have SELECT privilege to a table to read its values
(See <command>GRANT</command>/<command>REVOKE</command> statements).
(See <command>GRANT</command>/<command>REVOKE</command> statements).
...
@@ -709,6 +720,8 @@ SELECT [ ALL | DISTINCT ] <replaceable class="PARAMETER">expression</replaceable
...
@@ -709,6 +720,8 @@ SELECT [ ALL | DISTINCT ] <replaceable class="PARAMETER">expression</replaceable
[ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
[ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
[ { UNION [ALL] | INTERSECT | EXCEPT } <replaceable class="PARAMETER">select</replaceable>]
[ { UNION [ALL] | INTERSECT | EXCEPT } <replaceable class="PARAMETER">select</replaceable>]
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
[ FOR UPDATE [OF class_name...]]
[ LIMIT count [OFFSET|, count]]
</synopsis>
</synopsis>
<refsect2 id="R2-SQL-SELECTINTO-1">
<refsect2 id="R2-SQL-SELECTINTO-1">
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/psqlHelp.h
+
4
−
2
View file @
a4a5f562
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: psqlHelp.h,v 1.6
7
1999/06/03 19:
17:59
momjian Exp $
* $Id: psqlHelp.h,v 1.6
8
1999/06/03 19:
52:08
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -317,8 +317,10 @@ TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
...
@@ -317,8 +317,10 @@ TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
\t
[WHERE qual]
\n
\
\t
[WHERE qual]
\n
\
\t
[GROUP BY group_list]
\n
\
\t
[GROUP BY group_list]
\n
\
\t
[HAVING having_clause]
\n
\
\t
[HAVING having_clause]
\n
\
\t
[ { UNION [ALL] | INTERSECT | EXCEPT } SELECT ...]
\n
\
\t
[ORDER BY attr1 [ASC|DESC] [USING op1], ...attrN ]
\n
\
\t
[ORDER BY attr1 [ASC|DESC] [USING op1], ...attrN ]
\n
\
\t
[ { UNION [ALL] | INTERSECT | EXCEPT } SELECT ...];"
},
\t
[FOR UPDATE [OF class_name...]]
\n
\
\t
[LIMIT count [OFFSET|, count]];"
},
{
"set"
,
{
"set"
,
"set run-time environment"
,
"set run-time environment"
,
"\
"\
...
...
This diff is collapsed.
Click to expand it.
src/man/select.l
+
10
−
2
View file @
a4a5f562
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/select.l,v 1.1
2
1999/03
/
19
02:41:41
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/select.l,v 1.1
3
1999/
06/
03
19
:52:09
momjian Exp $
.TH SELECT SQL 11/05/95 PostgreSQL PostgreSQL
.TH SELECT SQL 11/05/95 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
select - retrieve instances from a class
select - retrieve instances from a class
...
@@ -14,8 +14,10 @@ select - retrieve instances from a class
...
@@ -14,8 +14,10 @@ select - retrieve instances from a class
[\fBwhere\fR where-clause]
[\fBwhere\fR where-clause]
[\fBgroup by\fR attr_name1 {, attr_name-i....}]
[\fBgroup by\fR attr_name1 {, attr_name-i....}]
[\fBhaving\fR having-clause]
[\fBhaving\fR having-clause]
[\fBorder by\fR attr_name1 [\fBasc\fR | \fBdesc\fR] [\fBusing op1\fR] {, attr_namei...}]
[ { \fBunion {all}\fR | \fBintersect\fR | \fBexcept\fR } \fBselect\fR ...]
[ { \fBunion {all}\fR | \fBintersect\fR | \fBexcept\fR } \fBselect\fR ...]
[\fBorder by\fR attr_name1 [\fBasc\fR | \fBdesc\fR] [\fBusing op1\fR] {, attr_namei...}]
[\fBfor update\fR [\fBof\fR class_name...]]
[\fBlimit\fR count [\fBoffset\fR|, count]]
.fi
.fi
.SH DESCRIPTION
.SH DESCRIPTION
...
@@ -37,6 +39,12 @@ clause allows a user to specify that he wishes the instances sorted
...
@@ -37,6 +39,12 @@ clause allows a user to specify that he wishes the instances sorted
according to the corresponding operator. This operator must be a
according to the corresponding operator. This operator must be a
binary one returning a boolean. Multiple sort fields are allowed and
binary one returning a boolean. Multiple sort fields are allowed and
are applied from left to right.
are applied from left to right.
The
.BR "for update"
allows the select statement to perform exclusive locking of selected rows.
The
.BR "limit/offset"
allows control over which rows are returned by the query.
.PP
.PP
The target list specifies the fields to be retrieved. Each
The target list specifies the fields to be retrieved. Each
.IR attr_name
.IR attr_name
...
...
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