aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-03-12 00:52:23 +0000
committerNeil Conway <neilc@samurai.com>2004-03-12 00:52:23 +0000
commitfe9c4420e4fd88fa1dcbed68b9fcc45494f7b585 (patch)
tree29679cd543413cfb8db098a07ad3c2fa1c76ed4e
parentbfd6f52b0e0f1c1d579bf385dedfebca229dfcf5 (diff)
downloadpostgresql-fe9c4420e4fd88fa1dcbed68b9fcc45494f7b585.tar.gz
postgresql-fe9c4420e4fd88fa1dcbed68b9fcc45494f7b585.zip
Improve documentation for the newly-added NOWAIT clause of LOCK TABLE.
-rw-r--r--doc/src/sgml/ref/lock.sgml30
1 files changed, 22 insertions, 8 deletions
diff --git a/doc/src/sgml/ref/lock.sgml b/doc/src/sgml/ref/lock.sgml
index a2c2a78a7aa..cab378ec95c 100644
--- a/doc/src/sgml/ref/lock.sgml
+++ b/doc/src/sgml/ref/lock.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/lock.sgml,v 1.41 2004/03/11 01:47:35 ishii Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/lock.sgml,v 1.42 2004/03/12 00:52:23 neilc Exp $
PostgreSQL documentation
-->
@@ -33,13 +33,15 @@ where <replaceable class="PARAMETER">lockmode</replaceable> is one of:
<title>Description</title>
<para>
- <command>LOCK TABLE</command> obtains a table-level lock, waiting if
- necessary for any conflicting locks to be released.
- If <literal>NOWAIT</literal> is given, <command>LOCK TABLE</command>
- does not wait for acquiring lock, and throws an error instead.
- Once obtained, the lock is held for the remainder of the current transaction.
- (There is no <command>UNLOCK TABLE</command> command; locks are always
- released at transaction end.)
+ <command>LOCK TABLE</command> obtains a table-level lock, waiting
+ if necessary for any conflicting locks to be released. If
+ <literal>NOWAIT</literal> is specified, <command>LOCK
+ TABLE</command> does not wait to acquire the desired lock: if it
+ cannot be immediately acquired, the transaction is aborted and an
+ error is emitted. Once obtained, the lock is held for the
+ remainder of the current transaction. (There is no <command>UNLOCK
+ TABLE</command> command; locks are always released at transaction
+ end.)
</para>
<para>
@@ -132,6 +134,18 @@ where <replaceable class="PARAMETER">lockmode</replaceable> is one of:
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><literal>NOWAIT</literal></term>
+ <listitem>
+ <para>
+ Specifies that <command>LOCK TABLE</command> should not wait for
+ any conflicting locks to be released: if the specified lock
+ cannot be immediately acquired without waiting, the transaction
+ is aborted.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>