Minor doc patch: create function
authorBruce Momjian
Thu, 20 Mar 2003 04:41:13 +0000 (04:41 +0000)
committerBruce Momjian
Thu, 20 Mar 2003 04:41:13 +0000 (04:41 +0000)
Gavin Sherry

doc/src/sgml/ref/create_function.sgml

index 71c09e6ef5b04ccf53bfa76c4f784fd06db0181e..2a6ca11c4b909bd57b0c290133b1705f812007ed 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -66,18 +66,22 @@ CREATE [ OR REPLACE ] FUNCTION name
 
      
       
-       The data type(s) of the function's arguments, if any.  The
-       input types may be base, complex, or domain types,
-       or the same as the type of an existing column.
-   The type of a column is referenced by writing 
-   class="parameter">tablename.
-   class="parameter">columnname%TYPE;
-   using this can sometimes help make a function independent from
-   changes to the definition of a table.
-   Depending on the implementation language it may also be allowed
-   to specify pseudo-types such as cstring.
-   Pseudo-types indicate that the actual argument type is either
-   incompletely specified, or outside the set of ordinary SQL data types.
+       The data type(s) of the function's arguments (optionally 
+       schema-qualified), if any. The input types may be base, complex, or 
+       domain types, or the same as the type of an existing column.
+      
+      
+       The type of a column is referenced by writing 
+       class="parameter">tablename.
+       class="parameter">columnname%TYPE;
+       using this can sometimes help make a function independent from
+       changes to the definition of a table.
+      
+      
+       Depending on the implementation language it may also be allowed
+       to specify pseudo-types such as cstring.
+       Pseudo-types indicate that the actual argument type is either
+       incompletely specified, or outside the set of ordinary SQL data types.
       
      
     
@@ -87,9 +91,13 @@ CREATE [ OR REPLACE ] FUNCTION name
 
      
       
-       The return data type.  The return type may be specified as a
-       base, complex, or domain type, or the same as the type of an
-       existing column.
+       The return data type (optionally schema-qualified). The return type 
+       may be specified as a base, complex, domain type 
+       or the same as the type of an existing column. See the description
+       under argtype above on how to reference the type
+       of an existing column.
+      
+      
        Depending on the implementation language it may also be allowed
        to specify pseudo-types such as cstring.
        The setof
@@ -432,13 +440,13 @@ CREATE FUNCTION point(complex) RETURNS point
 
 Point * complex_to_point (Complex *z)
 {
-   Point *p;
+    Point *p;
 
-   p = (Point *) palloc(sizeof(Point));
-   p->x = z->x;
-   p->y = z->y;
-       
-   return p;
+    p = (Point *) palloc(sizeof(Point));
+    p->x = z->x;
+    p->y = z->y;
+        
+    return p;
 }