More cleanup of Diagnostics sections.
authorTom Lane
Fri, 12 Sep 2003 00:12:47 +0000 (00:12 +0000)
committerTom Lane
Fri, 12 Sep 2003 00:12:47 +0000 (00:12 +0000)
29 files changed:
doc/src/sgml/ref/alter_group.sgml
doc/src/sgml/ref/alter_language.sgml
doc/src/sgml/ref/alter_schema.sgml
doc/src/sgml/ref/cluster.sgml
doc/src/sgml/ref/clusterdb.sgml
doc/src/sgml/ref/commit.sgml
doc/src/sgml/ref/create_database.sgml
doc/src/sgml/ref/create_sequence.sgml
doc/src/sgml/ref/create_view.sgml
doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createuser.sgml
doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/delete.sgml
doc/src/sgml/ref/drop_database.sgml
doc/src/sgml/ref/drop_user.sgml
doc/src/sgml/ref/dropdb.sgml
doc/src/sgml/ref/dropuser.sgml
doc/src/sgml/ref/end.sgml
doc/src/sgml/ref/explain.sgml
doc/src/sgml/ref/fetch.sgml
doc/src/sgml/ref/insert.sgml
doc/src/sgml/ref/listen.sgml
doc/src/sgml/ref/move.sgml
doc/src/sgml/ref/postmaster.sgml
doc/src/sgml/ref/set.sgml
doc/src/sgml/ref/truncate.sgml
doc/src/sgml/ref/update.sgml
doc/src/sgml/ref/vacuum.sgml
doc/src/sgml/ref/vacuumdb.sgml

index b9819f4a5268b372682b7a36075e0a7c13fa6b0e..31e94d76efc8993e97cda9d2375283ea2741390a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -45,7 +45,7 @@ ALTER GROUP groupname RENAME TO 
  
 
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
   
    
index 61595252ebff1009564547a2756b5b202a3be5fc..b0374a2c49e4dd0f3ebfc1b1a431fc137cd6d021 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -35,7 +35,7 @@ ALTER LANGUAGE name RENAME TO newname
  
 
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
   
    
index 473b57314d4a46bd6025a3aae099e7726321bcbf..6f61cc5672efe24903b911f5961880e4ffd4bf4a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -36,7 +36,7 @@ ALTER SCHEMA name RENAME TO newname
  
 
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
   
    
index 1eaa97e2e1e3121cd5aed555a0cc03e38fc69021..54efd0c4be0c8729551c6f5319bae3b65ae7ca6b 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -74,7 +74,7 @@ CLUSTER
  
 
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
   
    
index 8d4e082ec079e7f8897fe3dbb898eda49ed0b081..7be6d0959dab2be7f60e90d0dab3ff6df4c01178 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -48,16 +48,17 @@ PostgreSQL documentation
    clusterdb is a wrapper around the SQL
    command .
    There is no effective difference between clustering databases via
-   this or other methods.  The database server must be running at the
-   targeted host.  Also, any default settings and environment
-   variables used by the libpq front-end
-   library will apply.
+   this utility and via other methods for accessing the server.
   
 
   
    In case of difficulty, see 
    endterm="sql-cluster-title"> and  for
    discussions of potential problems and error messages.
+   The database server must be running at the
+   targeted host.  Also, any default connection settings and environment
+   variables used by the libpq front-end
+   library will apply.
   
 
  
index 1c72ea0b459e7a1af3d039a1c7226e09afcace65..4b026ccfd504b09b1777ee085781ebdfca2b570f 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -12,8 +12,8 @@ PostgreSQL documentation
  
   COMMIT
   commit the current transaction
  
-  
+
  
   COMMIT
  
@@ -74,7 +74,7 @@ COMMIT;
 
   
  
+
  
   Compatibility
   
index ddde0df33470938b6b6c0a8b4d6cd6376193bd07..9441c9841bde98698e4a8fd8d8453d5a2f9d8a12 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -36,6 +36,12 @@ CREATE DATABASE name
    PostgreSQL database.
   
 
+  
+   To create a database, you must be a superuser or have the special
+   CREATEDB privilege.
+   See .
+  
+
   
    Normally, the creator becomes the owner of the new database.
    Superusers can create databases owned by other users using the
@@ -63,6 +69,8 @@ CREATE DATABASE name
    a leading slash
    (e.g., /usr/local/pgsql/data),
    are allowed as well.
+   In either case, the final path name must be absolute and must not
+   contain any single quotes.
   
 
   
@@ -86,7 +94,7 @@ CREATE DATABASE name
  
 
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
     
      
@@ -147,78 +155,20 @@ CREATE DATABASE name
  
 
  
-  Diagnostics
-
-    
-     
-      CREATE DATABASE
-      
-       
-   Message returned if the database was successfully created.
-       
-      
-     
-
-     
-      ERROR:  user 'username' is not allowed to create/drop databases
-      
-       
-        You must have the special CREATEDB privilege to create databases.
-        See .
-       
-      
-     
-
-
-     
-      ERROR:  createdb: database "name" already exists
-      
-       
-   This occurs if a database with the specified name already
-   exists.
-       
-      
-     
-
-     
-      ERROR:  database path may not contain single quotes
-      
-       
-   The database location
-        dbpath cannot contain
-        single quotes. This is required so that the shell commands that
-        create the database directory can execute safely.
-       
-      
-     
-
-     
-      ERROR:  CREATE DATABASE: may not be called in a transaction block
-      
-       
-        If you have an explicit transaction block in progress you cannot call
-        CREATE DATABASE. You must finish the transaction first.
-       
-      
-     
-
-     
-      ERROR:  Unable to create database directory 'path'.
-      ERROR:  Could not initialize database directory.
-      
-       
-        These are most likely related to insufficient permissions on the data
-        directory, a full disk, or other file system problems. The user under
-        which the database server is running must have access to the location.
-       
-      
-     
+  Notes
 
-    
+   
+    CREATE DATABASE cannot be executed inside a transaction
+    block.
+   
 
-  Notes
+   
+    Errors along the line of could not initialize database directory
+    are most likely related to insufficient permissions on the data
+    directory, a full disk, or other file system problems.  When using an
+    alternate location, the user under
+    which the database server is running must have access to the location.
+   
 
    
     Use  to remove a database.
@@ -231,7 +181,8 @@ CREATE DATABASE name
 
   
    There are security issues involved with using alternate database
-   locations specified with absolute path names.  See 
+   locations specified with absolute path names; this is why the feature
+   is not enabled by default.  See 
    linkend="manage-ag-alternate-locs"> for more information.
   
 
index 5a9210fbcd353e12a33389ceea64cfe0c469976a..089695b1bbc7edcfacc8b4041c9af6b94753fda2 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -196,49 +196,6 @@ SELECT * FROM seqname;
   
  
 
-  Diagnostics
-
-  
-   
-    CREATE SEQUENCE
-    
-     
-      Message returned if the sequence was successfully created.
-     
-    
-   
-
-   
-    ERROR:  Relation 'seqname' already exists
-    
-     
-      A sequence, table, view, or index of the specified name already exists.
-     
-    
-   
-
-   
-    ERROR:  DefineSequence: MINVALUE (start) can't be >= MAXVALUE (max)
-    ERROR:  DefineSequence: START value (start) can't be < MINVALUE (min)
-    
-     
-      The specified starting value is out of range.
-     
-    
-   
-
-   
-    ERROR:  DefineSequence: MINVALUE (min) can't be >= MAXVALUE (max)
-    
-     
-      The minimum and maximum values are inconsistent.
-     
-    
-   
-  
-
  
   Notes
 
index 6bf9434a1b1e57ae0848a688e2dfbd54d6ce3726..a8d4a20f09a27f76ba610af89d591ee2c34c419a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -90,39 +90,6 @@ class="PARAMETER">column_name [, ...] ) ] AS 
   
  
 
-  Diagnostics
-
-  
-   
-    CREATE VIEW
-    
-     
-      Message returned if the view was successfully created.
-     
-    
-   
-
-   
-    WARNING:  Attribute 'column' has an unknown type
-    
-     
-      The view will be created having a column with an unknown type if
-      you do not specify it. For example, the following command gives
-      this warning:
-
-CREATE VIEW vista AS SELECT 'Hello World'
-
-      whereas this command does not:
-
-CREATE VIEW vista AS SELECT text 'Hello World'
-
-     
-    
-   
-  
-
  
   Notes
 
@@ -137,6 +104,20 @@ CREATE VIEW vista AS SELECT text 'Hello World'
    
     Use the DROP VIEW statement to drop views.
    
+
+   
+    Be careful that the names and types of the view's columns will be
+    assigned the way you want.  For example,
+
+CREATE VIEW vista AS SELECT 'Hello World';
+
+    is bad form in two ways: the column name defaults to ?column?,
+    and the column datatype defaults to unknown.  If you want a
+    string literal in a view's result, use something like
+
+CREATE VIEW vista AS SELECT text 'Hello World' AS hello;
+
+   
  
 
  
index 0af10c05843511fa6cb72e0211a5ddccec681df1..1c7e0ec4af8212c1f5e2f558706b20b3554fe485 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -48,12 +48,21 @@ PostgreSQL documentation
   
    createdb is a wrapper around the
    SQL command 
-   endterm="SQL-CREATEDATABASE-title">.  The database server must be 
-   running on the targeted host. There is nothing special about creating 
-   databases via this or other methods.  Also, any default settings and 
-   environment variables used by the libpq 
-   front-end library will apply.
+   endterm="SQL-CREATEDATABASE-title">.
+   There is no effective difference between creating databases via
+   this utility and via other methods for accessing the server.
   
+
+  
+   In case of difficulty, see 
+   endterm="sql-createdatabase-title"> and  for
+   discussions of potential problems and error messages.
+   The database server must be running at the
+   targeted host.  Also, any default connection settings and environment
+   variables used by the libpq front-end
+   library will apply.
+  
+
  
 
 
@@ -212,45 +221,6 @@ PostgreSQL documentation
  
 
 
-  Diagnostics
-
-    
-     
-      CREATE DATABASE
-      
-       The database was successfully created.
-      
-     
-
-     
-      createdb: Database creation failed.
-      
-       (Says it all.)
-      
-     
-
-     
-      createdb: Comment creation failed. (Database was created.)
-      
-       
-       The comment/description for the database could not be created.
-       The database itself will have been created already. You can use the
-       SQL command COMMENT ON DATABASE to
-       create the comment later on.
-       
-      
-     
-    
-
-   
-    If there is an error condition, the backend error message will be displayed.
-    See 
-    for possibilities.
-   
-
-
  
   Environment
 
index 0e6935f536b3dfe4da8605efd8c0faa6f179e8db..484f7fbe11f70e0cb4f658a3896b3cb412a5b2ee 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -49,17 +49,19 @@ PostgreSQL documentation
   
    createuser is a wrapper around the
    SQL command 
-   endterm="SQL-CREATEUSER-title">.  The database server must be 
-   running on the targeted host. There is nothing special
-   about creating users via this or other methods. Also, any
-   default settings and environment variables used by the
-   libpq front-end library will apply.
+   endterm="SQL-CREATEUSER-title">.
+   There is no effective difference between creating users via
+   this utility and via other methods for accessing the server.
   
 
   
-   Passwords can only be added later or changed using the
-   SQL command 
-   endterm="SQL-ALTERUSER-title">.
+   In case of difficulty, see 
+   endterm="sql-createuser-title"> and  for
+   discussions of potential problems and error messages.
+   The database server must be running at the
+   targeted host.  Also, any default connection settings and environment
+   variables used by the libpq front-end
+   library will apply.
   
 
  
@@ -101,6 +103,7 @@ PostgreSQL documentation
        
    The new user is not allowed to create other users (i.e.,
    the new user is a regular user, not a superuser).
+   This is the default.
        
       
      
@@ -121,6 +124,7 @@ PostgreSQL documentation
       
        
    The new user is not allowed to create databases.
+   This is the default.
        
       
      
@@ -142,7 +146,7 @@ PostgreSQL documentation
       
        
    Encrypts the user's password stored in the database. If not
-   specified, the default is used.
+   specified, the default password behavior is used.
        
       
      
@@ -164,7 +168,7 @@ PostgreSQL documentation
       
        
    Does not encrypt the user's password stored in the database. If
-   not specified, the default is used.
+   not specified, the default password behavior is used.
        
       
      
@@ -272,38 +276,6 @@ PostgreSQL documentation
  
 
 
-  Diagnostics
-
-    
-     
-      CREATE USER
-      
-       
-        The user was successfully created.
-       
-      
-     
-
-     
-      createuser: creation of user "username" failed
-      
-       
-        Something went wrong. The user was not created.
-       
-      
-     
-
-    
-
-   
-    If there is an error condition, the backend error message will be displayed.
-    See 
-    for possibilities.
-   
-
-
  
   Examples
 
index 1a3e3ccaffe47d2bfcd520727818eb3de8af99a4..a1884b5ee0bd512ff42208019142274ccd049770 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -44,9 +44,10 @@ DECLARE cursorname [ BINARY ] [ INS
    format.  Once the information comes back in text form, the client
    application may need to convert it to a binary format to manipulate
    it.  In addition, data in the text format is often larger in size
-   than in the binary format.  Binary cursors return the data in the
-   native binary representation.  Nevertheless, if you intend to
-   display the data as text anyway, retrieving it in text form will
+   than in the binary format.  Binary cursors return the data in a
+   binary representation that may be more easily manipulated.
+   Nevertheless, if you intend to display the data as text anyway,
+   retrieving it in text form will
    save you some effort on the client side.
   
 
@@ -54,7 +55,8 @@ DECLARE cursorname [ BINARY ] [ INS
    As an example, if a query returns a value of one from an integer column,
    you would get a string of 1 with a default cursor
    whereas with a binary cursor you would get
-   a 4-byte value containing the internal representation of the value.
+   a 4-byte field containing the internal representation of the value
+   (in big-endian byte order).
   
 
   
@@ -64,16 +66,16 @@ DECLARE cursorname [ BINARY ] [ INS
    format.
   
 
-  <para>
-   The string representation is architecture-neutral whereas binary
-   representation can differ between different machine architectures.
-   PostgreSQL does not resolve
-   byte ordering or representation issues for binary
-   cursors.  Therefore, if your client machine and server
-   machine use different representations (e.g.,
-   big-endian versus little-endian), you
-   will probably not want your data returned in binary format.
-  para>
+  <note>
+   
+    When the client application uses the extended query protocol
+    to issue a FETCH command, the Bind protocol message
+    specifies whether data is to be retrieved in text or binary format.
+    This choice overrides the way that the cursor is defined.  The concept
+    of a binary cursor as such is thus obsolete when using extended query
+    protocol --- any cursor can be treated as either text or binary.
+   
+  note>
  
 
  
@@ -84,8 +86,7 @@ DECLARE cursorname [ BINARY ] [ INS
     cursorname
     
      
-      The name of the cursor to be used in subsequent
-      FETCH operations.
+      The name of the cursor to be created.
      
     
    
@@ -192,48 +193,18 @@ DECLARE cursorname [ BINARY ] [ INS
   
  
 
-  Diagnostics
-
-  
-   
-    DECLARE CURSOR
-    
-     
-      The message returned if the cursor was successfully defined.
-     
-    
-   
-
-   
-    ERROR:  cursor "cursorname" already exists
-    
-     
-      This error occurs if a cursor with the same name already exists.
-     
-    
-   
-
-   
-    ERROR:  DECLARE CURSOR may only be used in begin/end transaction blocks
-    
-     
-      This error occurs if the cursor is not declared within a
-      transaction block, and WITH HOLD is not
-      specified.
-     
-    
-        
-  
-
  
   Notes
 
    
-    If WITH HOLD is not specified, the cursor
+    Unless WITH HOLD is specified, the cursor
     created by this command can only be used within the current
-    transaction. Use
+    transaction.  Thus, DECLARE without WITH
+    HOLD is useless outside a transaction block: the cursor would
+    survive only to the completion of the statement.  Therefore
+    PostgreSQL reports an error if this
+    command is used outside a transaction block.
+    Use
     ,
     
     and
index fea6a268abb648c124e307f8c655b056e09691dc..c0a58bd7ff7adda9994b17244c48fb206bb50584 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -52,7 +52,7 @@ DELETE FROM [ ONLY ] table [ WHERE
   
    You must have the DELETE privilege on the table
    to delete from it, as well as the SELECT
-   privilege to any table whose values are read in the 
+   privilege for any table whose values are read in the 
    class="parameter">condition.
   
  
@@ -84,22 +84,20 @@ DELETE FROM [ ONLY ] table [ WHERE
  
 
  
-  <span class="marked">Diagnostic</span>s
+  <span class="marked">Output</span>s
 
-  
-   
-    DELETE count
-    
-     
-      Message returned if rows are successfully deleted. The
-      count is the number
-      of rows deleted.  If 
-      class="parameter">count is 0, no rows were
-      deleted.
-     
-    
-   
-  
+  
+   On successful completion, a DELETE command returns a command
+   tag of the form
+
+DELETE count
+
+   The count is the number
+   of rows deleted.  If count is
+   0, no rows matched the 
+   class="parameter">condition (this is not considered
+   an error).
+  
  
 
  
index 1224b4142ec37ec2fd53eeae999b5e33663315a6..afb26d6a49af9abf22494fe2e1207d553e50c5f7 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -31,6 +31,9 @@ DROP DATABASE name
    DROP DATABASE drops a database. It removes the
    catalog entries for the database and deletes the directory
    containing the data.  It can only be executed by the database owner.
+   Also, it cannot be executed while you or anyone else are connected
+   to the target database.  (Connect to template1 or any
+   other database to issue this command.) 
   
 
   
@@ -53,44 +56,14 @@ DROP DATABASE name
   
  
 
-  Diagnostics
-
-    
-     
-      DROP DATABASE
-      
-       
-        This message is returned if the command was successful.
-       
-      
-     
-
-     
-      DROP DATABASE: cannot be executed on the currently open database
-      
-       
-        You cannot be connected to the database you are about to remove.
-        Instead, connect to template1 or any other
-        database and run this command again.
-       
-      
-     
-
-     
-      DROP DATABASE: may not be called in a transaction block
-      
-       
-        You must finish the transaction in progress before you can call this command.
-       
-      
-     
-    
-
  
   Notes
 
+   
+    DROP DATABASE cannot be executed inside a transaction
+    block.
+   
+
   
    This command cannot be executed while connected to the target
    database. Thus, it might be more convenient to use the program
index 143efbca9bd96a03be2195026f4237873a7d4cd5..b125c23a8e71a0e042f503e8889022c0ece6f0fd 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -49,39 +49,6 @@ DROP USER name
   
  
 
-  Diagnostics
-
-   
-    
-     DROP USER
-     
-      
-       Message returned if the user was successfully deleted.
-      
-     
-    
-
-    
-     ERROR:  DROP USER: user "name" does not exist
-     
-      
-       Message returned if the specified user does not exist.
-      
-     
-    
-
-    
-     DROP USER: user "name" owns database "name", cannot be removed
-     
-      
-       You must drop the database first or change its ownership.
-      
-     
-    
-   
-
  
   Notes
 
@@ -91,6 +58,11 @@ DROP USER name
    same functionality as this command (in fact, it calls this command)
    but can be run from the command shell.
   
+
+  
+   To drop a user who owns a database, first drop the database or change
+   its ownership.
+  
  
 
  
index 725eaf8991ff817dba0b758a00814e96b78b99f3..e1c28fe29313a90e32ea93d4550b4d1402f64de4 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -41,12 +41,21 @@ PostgreSQL documentation
   
    dropdb is a wrapper around the
    SQL command 
-   endterm="SQL-DROPDATABASE-title">.  The database server must be 
-   running on the targeted host. There is nothing special
-   about dropping databases via this or other methods. Also, any
-   default settings and environment variables used by the
-   libpq front-end library will apply.
+   endterm="SQL-DROPDATABASE-title">.
+   There is no effective difference between dropping databases via
+   this utility and via other methods for accessing the server.
   
+
+  
+   In case of difficulty, see 
+   endterm="sql-dropdatabase-title"> and  for
+   discussions of potential problems and error messages.
+   The database server must be running at the
+   targeted host.  Also, any default connection settings and environment
+   variables used by the libpq front-end
+   library will apply.
+  
+
  
 
 
@@ -100,7 +109,7 @@ PostgreSQL documentation
   
 
   
-   createdb also accepts the following
+   dropdb also accepts the following
    command-line arguments for connection parameters:
 
    
@@ -153,33 +162,6 @@ PostgreSQL documentation
  
 
 
-   Diagnostics
-
-    
-     
-      DROP DATABASE
-      
-       The database was successfully removed.
-      
-     
-
-     
-      dropdb: Database removal failed.
-      
-       Something didn't work out.
-      
-     
-    
-
-   
-    If there is an error condition, the backend error message will be displayed.
-    See 
-    for possibilities.
-   
-
-
  
   Environment
 
index 27d67f9ba885617d9e7b7b2e2654dff3755978c5..5c26050db96d094763df9cff96d0cd08ffbcc245 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -43,12 +43,21 @@ PostgreSQL documentation
   
    dropuser is a wrapper around the
    SQL command 
-   endterm="SQL-DROPUSER-title">.  The database server must be running
-   on the targeted host.  There is nothing special about removing
-   users via this or other methods.  Also, any default settings and
-   environment variables used by the libpq
-   front-end library will apply.
+   endterm="SQL-DROPUSER-title">.
+   There is no effective difference between dropping users via
+   this utility and via other methods for accessing the server.
   
+
+  
+   In case of difficulty, see 
+   endterm="sql-dropuser-title"> and  for
+   discussions of potential problems and error messages.
+   The database server must be running at the
+   targeted host.  Also, any default connection settings and environment
+   variables used by the libpq front-end
+   library will apply.
+  
+
  
 
 
@@ -103,7 +112,7 @@ PostgreSQL documentation
   
 
   
-   createuser also accepts the following
+   dropuser also accepts the following
    command-line arguments for connection parameters:
     
    
@@ -176,38 +185,6 @@ PostgreSQL documentation
  
 
 
-   Diagnostics
-
-    
-     
-      DROP USER
-      
-       
-        The user was successfully removed.
-       
-      
-     
-
-     
-      dropuser: deletion of user "username" failed
-      
-       
-        Something went wrong. The user was not removed.
-       
-      
-     
-
-    
-
-   
-    If there is an error condition, the backend error message will be displayed.
-    See 
-    and  for possibilities.
-   
-
-
  
   Examples
 
index 7772184ae835d5075113ec101109740287de18ae..115d25f00535b1678db9f01f938e95a5b979bd85 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -30,9 +30,10 @@ END [ WORK | TRANSACTION ]
   
    END commits the current transaction. All changes
    made by the transaction become visible to others and are guaranteed
-   to be durable if a crash occurs.  It is a
-   PostgreSQL extension that is equivalent
-   to .
+   to be durable if a crash occurs.  This command is a
+   PostgreSQL extension
+   that is equivalent to 
+   endterm="sql-commit-title">.
   
  
   
@@ -51,31 +52,7 @@ END [ WORK | TRANSACTION ]
    
   
  
-   
-  Diagnostics
 
-  
-   
-    COMMIT
-    
-     
-      Message returned if the transaction was successfully committed.
-     
-    
-   
-
-   
-    WARNING:  COMMIT: no transaction in progress
-    
-     
-      Message if there is no transaction in progress.
-     
-    
-   
-  
-  
  
   Notes
 
@@ -83,6 +60,11 @@ END [ WORK | TRANSACTION ]
    Use  to
    abort a transaction.
   
+
+  
+   Issuing END when not inside a transaction does
+   no harm, but it will provoke a warning message.
+  
  
 
  
@@ -106,6 +88,16 @@ END;
    specified in the SQL standard.
   
  
+
+  See Also
+
+  
+   
+   
+   
+  
 
 
 
 
@@ -80,7 +80,7 @@ ROLLBACK;
  
 
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
   
    
index 9c1050b835e3089514198464da8bad1c499771bf..5f3639d4c7fd19040a7756ff5e38cf45ec8108b7 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -45,7 +45,7 @@ where direction can be empty or one
   Description
 
   
-   FETCH retrieves rows using a cursor.
+   FETCH retrieves rows using a previously-created cursor.
   
 
   
@@ -280,6 +280,23 @@ where direction can be empty or one
   
  
 
+  Outputs
+
+  
+   On successful completion, a FETCH command returns a command
+   tag of the form
+
+FETCH count
+
+   The count is the number
+   of rows fetched (possibly zero).  Note that in
+   psql, the command tag will not actually be
+   displayed, since psql displays the fetched
+   rows instead.
+  
+
  
   Notes
 
index 76160d6dbec9d8cdd7cd44dabd231d7cae6b7fd3..40ecaccdaf86b1bf0b1b4e9c025658bc04d05ba8 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -119,30 +119,21 @@ INSERT INTO table [ ( 
  
 
  
-  <span class="marked">Diagnostic</span>s
+  <span class="marked">Output</span>s
 
-  
-   
-    INSERT oid 1
-    
-     
-      Message returned if only one row was inserted.
-      oid is the
-      OID of the inserted row.
-     
-    
-   
-
-   
-    INSERT 0 count
-    
-     
-      Message returned if more than one rows were inserted.
-      count is the number of rows inserted.
-     
-    
-   
-  
+  
+   On successful completion, an INSERT command returns a command
+   tag of the form
+
+INSERT oid count
+
+   The count is the number
+   of rows inserted.  If count
+   is exactly one, and the target table has OIDs, then
+   oid is the
+   OID assigned to the inserted row.  Otherwise
+   oid is zero.
+  
  
 
  
index 7de13387dbde947df3a903561cf786c0fd9cb2d7..8029b5ed036afde73ede82022ca016fda50c0956 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -31,6 +31,9 @@ LISTEN name
    LISTEN registers the current session as a
    listener on the notification condition 
    class="PARAMETER">name.
+   If the current session is already registered as a listener for
+   this notification condition, a warning message appears and nothing
+   is done.
   
 
   
@@ -85,30 +88,6 @@ LISTEN name
   
  
 
-  Diagnostics
-
-  
-   
-    LISTEN
-    
-     
-      Message returned upon successful completion of registration.
-     
-    
-   
-
-   
-    WARNING:  Async_Listen: We are already listening on name
-    
-     
-      Message returned if this session is already registered for that notification condition.
-     
-    
-   
-  
-
  
   Examples
 
@@ -117,7 +96,7 @@ LISTEN name
 
 LISTEN virtual;
 NOTIFY virtual;
-Asynchronous NOTIFY 'virtual' from backend with pid '8448' received.
+Asynchronous notification "virtual" received from server process with PID 8448.
 
   
  
index 471e0529790cc6825afd9ecc84907b88f2490a99..c13cdc9ead3d41e7eb0d0b800595f54cfb7c7165 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -41,12 +41,16 @@ MOVE [ direction { FROM | IN } ] 
  
 
  
-  <span class="marked">Diagnostic</span>s
+  <span class="marked">Output</span>s
 
   
-   The count returned in MOVE's status string is
-   the count of the number of rows that would have been returned by
-   the equivalent FETCH command.
+   On successful completion, a MOVE command returns a command
+   tag of the form
+
+MOVE count
+
+   The count is the number
+   of rows moved over (possibly zero).
   
  
 
index 07c6f2bfc024536b4bfb2df11a7f9eb0574301a3..77aecf70310fc2b5f112d8268d28820059ae7585 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -419,73 +419,52 @@ PostgreSQL documentation
 
  
    Diagnostics
-   
 
-    
-     
-      semget: No space left on device
-      
-       
-   If you see this message, you probably need to configure
-   your kernel for shared memory and semaphores as described in .
-   If you run multiple instances of
-   postmaster
-   on a single host, or have a kernel with particularly small shared memory
-   and/or semaphore limits, you may have to reconfigure your kernel to increase
-   its shared memory or semaphore parameters.
-       
+   
+    A failure message mentioning semget or shmget
+    probably indicates you need to configure your kernel to provide adequate
+    shared memory and semaphores.  For more discussion see 
+    linkend="kernel-resources">.
+   
 
-   
-    
-     You may be able to postpone
-     reconfiguring your kernel by decreasing  to reduce
-     the shared memory consumption of PostgreSQL,
-     and/or by reducing  to reduce the semaphore
-     consumption.
-    
-   
-      
-     
+   
+    
+     You may be able to postpone reconfiguring your kernel by decreasing
+     shared_buffers to reduce the shared memory consumption
+     of PostgreSQL, and/or by reducing
+     max_connections to reduce the semaphore consumption.
+    
+   
 
-     
-      StreamServerPort: cannot bind to port
-      
-       
-   If you see this message, you should make certain that there is no
-   other postmaster
-   process already running on the same port number.  The easiest way to
-   determine this is by using the command
+   
+    A failure message suggesting that another postmaster is already running
+    should be checked carefully, for example by using the command
 
 $ ps ax | grep postmaster
 
         or
 
-$ ps -e | grep postmaster
+$ ps -ef | grep postmaster
 
-   depending on your system.
-       
+    depending on your system.  If you are certain that no conflicting
+    postmaster is running, you may remove the lock file mentioned in the
+    message and try again.
+   
 
-       
-   If you 
-   are sure that no other
-   postmaster
-   processes are running and you still get this error, try specifying a
-   different port using the
-   -p
-   option.  You may also get this error if you terminate the
-   postmaster
-   and immediately restart it using the same port; in this case, you must
-   simply wait a few seconds until the operating system closes the port
-   before trying again.  Finally, you may get this error if you specify
-   a port number that your operating system considers to be reserved.
-   For example, many versions of Unix consider port numbers under 1024 to
-   be trusted
-   and only permit the Unix superuser to access them.
-       
-      
-     
-    
+   
+    A failure message indicating inability to bind to a port may indicate
+    that that port is already in use by some non-PostgreSQL process.
+    You may also get this error if you terminate the
+    postmaster
+    and immediately restart it using the same port; in this case, you must
+    simply wait a few seconds until the operating system closes the port
+    before trying again.  Finally, you may get this error if you specify
+    a port number that your operating system considers to be reserved.
+    For example, many versions of Unix consider port numbers under 1024 to
+    be trusted
+    and only permit the Unix superuser to access them.
    
+
  
 
  
index cf9f0468adedf72bd05fc439a68c8b562ef04f85..1bdb3d0ebb40ff131aa82637f587f6707f47945e 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -224,48 +224,6 @@ SELECT setseed(value);
   
  
 
-  Diagnostics
-
-   
-    
-     SET
-     
-      
-       Message returned if successful.
-      
-     
-    
-     
-    
-     ERROR:  'name' is not a valid option name
-     
-      
-       The parameter you tried to set does not exist.
-      
-     
-    
-     
-    
-     ERROR:  'name': permission denied
-     
-      
-       You must be a superuser to alter certain settings.
-      
-     
-    
-     
-    
-     ERROR:  'name' cannot be changed after server start
-     
-      
-       Some parameters are fixed once the server is started.
-      
-     
-    
-   
-
  
   Notes
 
index 3fca86910359593a32c3ee86ac2399757c7b96c5..fc65f65db55ed98df99eb53f5fbb1ee4a9e10ca1 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -36,7 +36,7 @@ TRUNCATE [ TABLE ] name
  
   
  
-  Parameter
+  Parameter<span class="marked">s</span>
 
   
    
index 01917b362df9df5e353b71a1d00f741ea6379b6c..10d5886b3b26acc1bd9d1ddb469f9f0b48ec5feb 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -118,21 +118,20 @@ UPDATE [ ONLY ] table SET 
  
 
  
-  <span class="marked">Diagnostic</span>s
+  <span class="marked">Output</span>s
 
-  
-   
-    UPDATE count
-    
-     
-      Message returned if successful.  The value 
-      class="parameter">count is the number of rows
-      updated.  If count
-      is 0, no rows were updated.
-     
-    
-   
-  
+  
+   On successful completion, an UPDATE command returns a command
+   tag of the form
+
+UPDATE count
+
+   The count is the number
+   of rows updated.  If count is
+   0, no rows matched the 
+   class="parameter">condition (this is not considered
+   an error).
+  
  
 
  
index 7102a3d0d336273d39bdef92e3a11c4f098cf3f9..aab2f74bf1425b7144d84c577abf3e79d1857dd7 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -143,49 +143,13 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ 
  
 
  
-  <span class="marked">Diagnostic</span>s
+  <span class="marked">Output</span>s
 
-  
-   
-    VACUUM
-    
-     
-      The command is complete.
-     
-    
-   
-
-   
-    INFO:  --Relation table--
-    
-     
-      The report header for table.
-     
-    
-   
-
-   
-    INFO:  Pages 98: Changed 25, Reapped 74, Empty 0, New 0;
-         Tup 1000: Vac 3000, Crash 0, UnUsed 0, MinLen 188, MaxLen 188;
-         Re-using: Free/Avail. Space 586952/586952; EndEmpty/Avail. Pages 0/74.
-         Elapsed 0/0 sec.
-    
-     
-      The analysis for table itself.
-     
-    
-   
-
-   
-    INFO:  Index index: Pages 28;
-         Tuples 1000: Deleted 3000. Elapsed 0/0 sec.
-    
-     
-      The analysis for an index on the target table.
-     
-    
-   
-  
+   
+    When VERBOSE is specified, VACUUM emits
+    progress messages to indicate which table is currently being
+    processed.  Various statistics about the tables are printed as well.
+   
  
 
  
@@ -216,25 +180,37 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ 
   Examples
 
   
-   The following is an example from running VACUUM on a table
-   in the regression database:
+   The following is an example from running VACUUM on a
+   table in the regression database:
 
 
-=> VACUUM VERBOSE ANALYZE onek;
-INFO:  --Relation onek--
-INFO:  Index onek_unique1: Pages 14; Tuples 1000: Deleted 3000.
-        CPU 0.00s/0.11u sec elapsed 0.12 sec.
-INFO:  Index onek_unique2: Pages 16; Tuples 1000: Deleted 3000.
-        CPU 0.00s/0.10u sec elapsed 0.10 sec.
-INFO:  Index onek_hundred: Pages 13; Tuples 1000: Deleted 3000.
-        CPU 0.00s/0.10u sec elapsed 0.10 sec.
-INFO:  Index onek_stringu1: Pages 31; Tuples 1000: Deleted 3000.
-        CPU 0.01s/0.09u sec elapsed 0.10 sec.
-INFO:  Removed 3000 tuples in 70 pages.
-        CPU 0.02s/0.04u sec elapsed 0.07 sec.
-INFO:  Pages 94: Changed 0, Empty 0; Tup 1000: Vac 3000, Keep 0, UnUsed 0.
-        Total CPU 0.05s/0.45u sec elapsed 0.59 sec.
-INFO:  Analyzing onek
+regression=# VACUUM VERBOSE ANALYZE onek;
+INFO:  vacuuming "public.onek"
+INFO:  index "onek_unique1" now contains 1000 tuples in 14 pages
+DETAIL:  3000 index tuples were removed.
+0 index pages have been deleted, 0 are currently reusable.
+CPU 0.01s/0.08u sec elapsed 0.18 sec.
+INFO:  index "onek_unique2" now contains 1000 tuples in 16 pages
+DETAIL:  3000 index tuples were removed.
+0 index pages have been deleted, 0 are currently reusable.
+CPU 0.00s/0.07u sec elapsed 0.23 sec.
+INFO:  index "onek_hundred" now contains 1000 tuples in 13 pages
+DETAIL:  3000 index tuples were removed.
+0 index pages have been deleted, 0 are currently reusable.
+CPU 0.01s/0.08u sec elapsed 0.17 sec.
+INFO:  index "onek_stringu1" now contains 1000 tuples in 48 pages
+DETAIL:  3000 index tuples were removed.
+0 index pages have been deleted, 0 are currently reusable.
+CPU 0.01s/0.09u sec elapsed 0.59 sec.
+INFO:  "onek": removed 3000 tuples in 108 pages
+DETAIL:  CPU 0.01s/0.06u sec elapsed 0.07 sec.
+INFO:  "onek": found 3000 removable, 1000 nonremovable tuples in 143 pages
+DETAIL:  0 dead tuples cannot be removed yet.
+There were 0 unused item pointers.
+0 pages are entirely empty.
+CPU 0.07s/0.39u sec elapsed 1.56 sec.
+INFO:  analyzing "public.onek"
+INFO:  "onek": 36 pages, 1000 rows sampled, 1000 estimated total rows
 VACUUM
 
   
index 31390050c298d61ce24f313e224e475df860687c..63d7b4d3ee49ec2e5bb5ff5ddb70fed7e4debcb4 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -55,13 +55,19 @@ PostgreSQL documentation
    vacuumdb is a wrapper around the SQL
    command .
    There is no effective difference between vacuuming databases via
-   this or other methods.  The database server must be running at the
-   targeted host.  Also, any default settings and environment
+   this utility and via other methods for accessing the server.
+  
+
+  
+   In case of difficulty, see 
+   endterm="sql-vacuum-title"> and  for
+   discussions of potential problems and error messages.
+   The database server must be running at the
+   targeted host.  Also, any default connection settings and environment
    variables used by the libpq front-end
    library will apply.
   
 
-
   
    vacuumdb might need to connect several
    times to the PostgreSQL server, asking
@@ -230,37 +236,6 @@ PostgreSQL documentation
  
 
 
-  Diagnostics
-
-   
-    
-     
-      VACUUM
-      
-       
-        The database was successfully vacuumed.
-       
-      
-     
-
-     
-      vacuumdb: Vacuum failed.
-      
-       
-        Something went wrong. vacuumdb is only a wrapper
-        script. See 
-        and  for a detailed
-        discussion of error messages and potential problems.
-       
-      
-     
-
-    
-   
-
-
  
   Environment