Document that utility commands such as DROP FUNCTION allow argument names
authorTom Lane
Thu, 26 May 2005 20:05:03 +0000 (20:05 +0000)
committerTom Lane
Thu, 26 May 2005 20:05:03 +0000 (20:05 +0000)
and modes to be included when naming an existing function.

doc/src/sgml/ref/alter_function.sgml
doc/src/sgml/ref/comment.sgml
doc/src/sgml/ref/drop_function.sgml
doc/src/sgml/ref/grant.sgml
doc/src/sgml/ref/revoke.sgml

index 468aa2b2e2e7f0656dd899fa8306dfc797ad14e7..2f4b901f48ee63dea10edd480ff32b1b66b4cb24 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -20,9 +20,12 @@ PostgreSQL documentation
 
  
 
-ALTER FUNCTION name ( [ type [, ...] ] ) action [, ... ] [ RESTRICT ]
-ALTER FUNCTION name ( [ type [, ...] ] ) RENAME TO newname
-ALTER FUNCTION name ( [ type [, ...] ] ) OWNER TO newowner
+ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
+    action [, ... ] [ RESTRICT ]
+ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
+    RENAME TO newname
+ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
+    OWNER TO newowner
 
 where action is one of:
 
@@ -55,10 +58,41 @@ where action is one of:
    
 
    
-    type
+    argmode
+
+    
+     
+      The mode of an argument: either IN, OUT,
+      or INOUT.  If omitted, the default is IN.
+      Note that ALTER FUNCTION does not actually pay
+      any attention to OUT arguments, since only the input
+      arguments are needed to determine the function's identity.
+      So it is sufficient to list the IN and INOUT
+      arguments.
+     
+    
+   
+
+   
+    argname
+
+    
+     
+      The name of an argument.
+      Note that ALTER FUNCTION does not actually pay
+      any attention to argument names, since only the argument data
+      types are needed to determine the function's identity.
+     
+    
+   
+
+   
+    argtype
+
     
      
-      The data type of an argument of the function.
+      The data type(s) of the function's arguments (optionally 
+      schema-qualified), if any.
      
     
    
@@ -116,8 +150,8 @@ where action is one of:
    
 
    
-    EXTERNAL SECURITY INVOKER
-    EXTERNAL SECURITY DEFINER
+     EXTERNAL  SECURITY INVOKER
+     EXTERNAL  SECURITY DEFINER
 
     
      
index 961623c3da363d81f0c64c7157ed646e8bf2b8da..593df4743c02b35e6d6a7c6cee6e37e75b6cd557 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -30,7 +30,7 @@ COMMENT ON
   CONVERSION object_name |
   DATABASE object_name |
   DOMAIN object_name |
-  FUNCTION func_name (arg1_type, arg2_type, ...) |
+  FUNCTION func_name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) |
   INDEX object_name |
   LARGE OBJECT large_object_oid |
   OPERATOR op (leftoperand_type, rightoperand_type) |
@@ -103,6 +103,64 @@ COMMENT ON
      
     
    
+   
+   
+     sourcetype
+     
+      
+       The name of the source data type of the cast.
+      
+     
+    
+
+    
+     targettype
+     
+      
+       The name of the target data type of the cast.
+      
+     
+    
+
+   
+    argmode
+
+    
+     
+      The mode of a function argument: either IN, OUT,
+      or INOUT.  If omitted, the default is IN.
+      Note that COMMENT ON FUNCTION does not actually pay
+      any attention to OUT arguments, since only the input
+      arguments are needed to determine the function's identity.
+      So it is sufficient to list the IN and INOUT
+      arguments.
+     
+    
+   
+
+   
+    argname
+
+    
+     
+      The name of a function argument.
+      Note that COMMENT ON FUNCTION does not actually pay
+      any attention to argument names, since only the argument data
+      types are needed to determine the function's identity.
+     
+    
+   
+
+   
+    argtype
+
+    
+     
+      The data type(s) of the function's arguments (optionally 
+      schema-qualified), if any.
+     
+    
+   
 
    
     large_object_oid
@@ -122,24 +180,6 @@ COMMENT ON
       
      
     
-   
-   
-     sourcetype
-     
-      
-       The name of the source data type of the cast.
-      
-     
-    
-
-    
-     targettype
-     
-      
-       The name of the target data type of the cast.
-      
-     
-    
 
    
     text
index 7cc8b7f4da01eb49e28a55a29afb98b74b140b17..85290acff0830addb5d9833583b42119b2a07038 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -20,7 +20,8 @@ PostgreSQL documentation
 
  
 
-DROP FUNCTION name ( [ type [, ...] ] ) [ CASCADE | RESTRICT ]
+DROP FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
+    [ CASCADE | RESTRICT ]
 
  
 
@@ -50,10 +51,41 @@ DROP FUNCTION name ( [ 
    
 
    
-    type
+    argmode
+
+    
+     
+      The mode of an argument: either IN, OUT,
+      or INOUT.  If omitted, the default is IN.
+      Note that DROP FUNCTION does not actually pay
+      any attention to OUT arguments, since only the input
+      arguments are needed to determine the function's identity.
+      So it is sufficient to list the IN and INOUT
+      arguments.
+     
+    
+   
+
+   
+    argname
+
+    
+     
+      The name of an argument.
+      Note that DROP FUNCTION does not actually pay
+      any attention to argument names, since only the argument data
+      types are needed to determine the function's identity.
+     
+    
+   
+
+   
+    argtype
+
     
      
-      The data type of an argument of the function.
+      The data type(s) of the function's arguments (optionally 
+      schema-qualified), if any.
      
     
    
index 45f384f48684c9830ef46efefa6473901591a1fa..c1875abb2fe60022f63b83afa6e9fc654914385b 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -30,7 +30,7 @@ GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
     TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT { EXECUTE | ALL [ PRIVILEGES ] }
-    ON FUNCTION funcname ([type, ...]) [, ...]
+    ON FUNCTION funcname ( [ [ argmode ] [ argname ] argtype [, ...] ] ) [, ...]
     TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT { USAGE | ALL [ PRIVILEGES ] }
index 5f94537e26e3d24646487bcb7156364a9543370f..b7bd2faa8ea2a8674b9611b775a0f3a85e1a1ace 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -35,7 +35,7 @@ REVOKE [ GRANT OPTION FOR ]
 
 REVOKE [ GRANT OPTION FOR ]
     { EXECUTE | ALL [ PRIVILEGES ] }
-    ON FUNCTION funcname ([type, ...]) [, ...]
+    ON FUNCTION funcname ( [ [ argmode ] [ argname ] argtype [, ...] ] ) [, ...]
     FROM { username | GROUP groupname | PUBLIC } [, ...]
     [ CASCADE | RESTRICT ]