Update lock sgml/man/psql help pages.
This commit is contained in:
parent
4a077caa60
commit
e1ea7cc2e5
@ -18,7 +18,7 @@
|
|||||||
<DATE>1998-09-24</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
LOCK [ TABLE ] <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
LOCK [ TABLE ] [[IN] [ROW|ACCESS] [SHARE|EXCLUSIVE] MODE] <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||||
</SYNOPSIS>
|
</SYNOPSIS>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOCK-1">
|
<REFSECT2 ID="R2-SQL-LOCK-1">
|
||||||
@ -55,20 +55,6 @@
|
|||||||
<PARA>
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>
|
|
||||||
DELETE 0
|
|
||||||
</TERM>
|
|
||||||
<LISTITEM>
|
|
||||||
<PARA>
|
|
||||||
Message returned on a successful lock.
|
|
||||||
<command>LOCK</command> is implemented as a
|
|
||||||
<command>DELETE FROM <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE></command>
|
|
||||||
which is guaranteed to not delete any rows.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>
|
<TERM>
|
||||||
ERROR <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>: Table does not exist.
|
ERROR <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>: Table does not exist.
|
||||||
</TERM>
|
</TERM>
|
||||||
@ -92,8 +78,9 @@
|
|||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
<command>LOCK</command> locks in exclusive mode a table inside
|
By default, <command>LOCK</command> locks in exclusive mode a table inside
|
||||||
a transaction. The classic use for this is
|
a transaction. Various options allow shared access, or row-level locking
|
||||||
|
control. The classic use for this is
|
||||||
the case where you want to select some data, then
|
the case where you want to select some data, then
|
||||||
update it inside a transaction.
|
update it inside a transaction.
|
||||||
If you don't explicit lock a table using LOCK statement, it will be
|
If you don't explicit lock a table using LOCK statement, it will be
|
||||||
@ -183,7 +170,7 @@
|
|||||||
<PARA>
|
<PARA>
|
||||||
There is no <command>LOCK TABLE</command> in <acronym>SQL92</acronym>,
|
There is no <command>LOCK TABLE</command> in <acronym>SQL92</acronym>,
|
||||||
which instead uses <command>SET TRANSACTION</command> to specify
|
which instead uses <command>SET TRANSACTION</command> to specify
|
||||||
concurrency level on transactions.
|
concurrency level on transactions. We support that too.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -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.66 1999/06/03 18:37:59 momjian Exp $
|
* $Id: psqlHelp.h,v 1.67 1999/06/03 19:17:59 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -283,7 +283,8 @@ static struct _helpStruct QL_HELP[] = {
|
|||||||
{"lock",
|
{"lock",
|
||||||
"exclusive lock a table inside a transaction",
|
"exclusive lock a table inside a transaction",
|
||||||
"\
|
"\
|
||||||
\tLOCK [TABLE] class_name;"},
|
\tLOCK [TABLE] class_name \n\
|
||||||
|
\t[[IN] [ROW|ACCESS] [SHARE|EXCLUSIVE] MODE];"},
|
||||||
{"move",
|
{"move",
|
||||||
"move an cursor position",
|
"move an cursor position",
|
||||||
"\
|
"\
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
.\" This is -*-nroff-*-
|
.\" This is -*-nroff-*-
|
||||||
.\" XXX standard disclaimer belongs here....
|
.\" XXX standard disclaimer belongs here....
|
||||||
.\" $Header: /cvsroot/pgsql/src/man/Attic/lock.l,v 1.5 1998/03/23 15:09:34 momjian Exp $
|
.\" $Header: /cvsroot/pgsql/src/man/Attic/lock.l,v 1.6 1999/06/03 19:18:00 momjian Exp $
|
||||||
.TH FETCH SQL 01/23/93 PostgreSQL PostgreSQL
|
.TH FETCH SQL 01/23/93 PostgreSQL PostgreSQL
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lock - exclusive lock a table
|
lock - exclusive lock a table
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
\fBlock\fR [\fBtable\fR] classname
|
\fBlock\fR [\fBtable\fR] classname [[IN] [ROW|ACCESS] [SHARE|EXCLUSIVE] MODE]
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
By default,
|
||||||
.BR lock
|
.BR lock
|
||||||
exclusive locks a table inside a transaction. The classic use for this
|
exclusive locks an entire table inside a transaction.
|
||||||
|
Various options allow shared access, or row-level locking control.
|
||||||
|
.PP
|
||||||
|
The classic use for this
|
||||||
is the case where you want to \fBselect\fP some data, then update it
|
is the case where you want to \fBselect\fP some data, then update it
|
||||||
inside a transaction. If you don't exclusive lock the table before the
|
inside a transaction. If you don't exclusive lock the table before the
|
||||||
\fBselect\fP, some other user may also read the selected data, and try
|
\fBselect\fP, some other user may also read the selected data, and try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user