Update lock sgml/man/psql help pages.
authorBruce Momjian
Thu, 3 Jun 1999 19:18:00 +0000 (19:18 +0000)
committerBruce Momjian
Thu, 3 Jun 1999 19:18:00 +0000 (19:18 +0000)
doc/src/sgml/ref/lock.sgml
src/bin/psql/psqlHelp.h
src/man/lock.l

index dc702b0cdb8550c21ebdcd87bf043248ee2f1551..804872d4a103776cefa1c2ea77d2c80e6f790147 100644 (file)
@@ -18,7 +18,7 @@
    1998-09-24
   
   
-   LOCK [ TABLE ] table
+   LOCK [ TABLE ] [[IN] [ROW|ACCESS] [SHARE|EXCLUSIVE] MODE] table
   
 
   
    
     
     
-     
-      
-       DELETE 0
-      
-      
-       
-   Message returned on a successful lock.
-   LOCK is implemented as a 
-   DELETE FROM table
-   which is guaranteed to not delete any rows.
-       
-      
-     
-     
       
        ERROR table: Table does not exist.
       
@@ -92,8 +78,9 @@
    Description
   
   
-   LOCK locks in exclusive mode a table inside
-   a transaction. The classic use for this is
+   By default, LOCK locks in exclusive mode a table inside
+   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
    update it inside a transaction.
    If you don't explicit lock a table using LOCK statement, it will be
    
     There is no LOCK TABLE in SQL92,
     which instead uses SET TRANSACTION to specify
-    concurrency level on transactions.
+    concurrency level on transactions.  We support that too.
    
   
  
index 6840786358f2e0571512792c024a444edf84fc85..507b0d54b4d139fa40600273dc7078a1f561a493 100644 (file)
@@ -5,7 +5,7 @@
  *
  * 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",
        "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 an cursor position",
    "\
index 440e491b8637718ed433e03113d0b0f2790cb40f..5f71a8a5d6ac63833d2f22d3314cabe6c49d87da 100644 (file)
@@ -1,16 +1,20 @@
 .\" This is -*-nroff-*-
 .\" 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
 .SH NAME
 lock - exclusive lock a table
 .SH SYNOPSIS
 .nf
-\fBlock\fR [\fBtable\fR] classname
+\fBlock\fR [\fBtable\fR] classname [[IN] [ROW|ACCESS] [SHARE|EXCLUSIVE] MODE]
 .fi
 .SH DESCRIPTION
+By default,
 .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
 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