Some editorial improvements for recently-added ALTER SEQUENCE/VIEW
authorTom Lane
Wed, 3 Oct 2007 16:48:43 +0000 (16:48 +0000)
committerTom Lane
Wed, 3 Oct 2007 16:48:43 +0000 (16:48 +0000)
documentation.  Heikki and Tom

doc/src/sgml/ref/alter_sequence.sgml
doc/src/sgml/ref/alter_view.sgml

index c2bc3cd8bf516479603f50bd88af448525348f24..b515ae46016485a3b424e848bd27b900ed884ed0 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -28,8 +28,8 @@ ALTER SEQUENCE name [ INCREMENT [ B
     [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
     [ RESTART [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
     [ OWNED BY { table.column | NONE } ]
-ALTER SEQUENCE name SET SCHEMA new_schema
 ALTER SEQUENCE name RENAME TO new_name
+ALTER SEQUENCE name SET SCHEMA new_schema
   
  
 
@@ -184,19 +184,19 @@ ALTER SEQUENCE name RENAME TO 
    
 
    
-    new_schema
+    new_name
     
      
-      The new schema for the sequence.
+      The new name for the sequence.
      
     
    
 
    
-    new_name
+    new_schema
     
      
-      The new name for the sequence.
+      The new schema for the sequence.
      
     
    
@@ -205,17 +205,6 @@ ALTER SEQUENCE name RENAME TO 
    
   
 
-  Examples
-
-  
-   Restart a sequence called serial, at 105:
-
-ALTER SEQUENCE serial RESTART WITH 105;
-
-  
-
  
   Notes
 
@@ -224,8 +213,8 @@ ALTER SEQUENCE serial RESTART WITH 105;
    same sequence, ALTER SEQUENCE's effects on the sequence
    generation parameters are never rolled back;
    those changes take effect immediately and are not reversible.  However,
-   the OWNED BY and SET SCHEMA clauses are ordinary
-   catalog updates and can be rolled back.
+   the OWNED BYRENAME, and SET SCHEMA
+   clauses cause ordinary catalog updates that can be rolled back.
   
 
   
@@ -239,20 +228,30 @@ ALTER SEQUENCE serial RESTART WITH 105;
 
   
    Some variants of ALTER TABLE can be used with
-   sequences as well; for example, to rename a sequence use ALTER
-   TABLE RENAME.
+   sequences as well; for example, to rename a sequence it is also
+   possible to use ALTER TABLE RENAME.
   
  
 
+  Examples
+
+  
+   Restart a sequence called serial, at 105:
+
+ALTER SEQUENCE serial RESTART WITH 105;
+
+  
 
  
   Compatibility
 
   
    ALTER SEQUENCE conforms to the SQL
-   standard,
-   except for the OWNED BY and SET SCHEMA
-   clauses, which are PostgreSQL extensions.
+   standard, except for the OWNED BY, RENAME, and
+   SET SCHEMA clauses, which are
+   PostgreSQL extensions.
   
  
 
index 4d0c657d184e79dff0152f1a82d9ae7418ec2ce2..7dd052cc1244512638684d1e0f3178ba5dd45e1d 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -28,8 +28,9 @@ ALTER VIEW name RENAME TO newname
   Description
 
   
-   ALTER VIEW changes the definition of a
-   view. To execute this command you must be the owner of the view.
+   ALTER VIEW changes the definition of a view.
+   The only currently available functionality is to rename the view.
+   To execute this command you must be the owner of the view.
   
  
   
@@ -57,6 +58,18 @@ ALTER VIEW name RENAME TO newname
   
  
 
+  Notes
+
+  
+   Some variants of ALTER TABLE can be used with
+   views as well; for example, to rename a view it is also
+   possible to use ALTER TABLE RENAME.  To change
+   the schema or owner of a view, you currently must use ALTER
+   TABLE.
+  
+
  
   Examples