Document pltcl's return_null command.
authorTom Lane
Mon, 30 Apr 2001 22:22:34 +0000 (22:22 +0000)
committerTom Lane
Mon, 30 Apr 2001 22:22:34 +0000 (22:22 +0000)
doc/src/sgml/pltcl.sgml

index 59f464aebaf7846398f5abb334ae2770f15d562c..7d7ceb33792ffefd9e7d0b0c2a7afb98a49174b3 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -96,8 +96,10 @@ CREATE FUNCTION funcname (argument-types
      
 
      When the function is called, the arguments are given as
-     variables $1 ... $n to the Tcl procedure body.  For example,
-     a function
+     variables $1 ... $n to the
+     Tcl procedure body.  The result is returned
+     from the Tcl code in the usual way, with a return
+     statement.  For example, a function
      returning the higher of two int4 values could be defined as:
 
      
@@ -107,6 +109,11 @@ CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '
 ' LANGUAGE 'pltcl';
      
 
+     To return a NULL value from a PL/Tcl function, execute
+     return_null.
+    
+
+    
      Composite type arguments are given to the procedure as Tcl arrays.
      The element names
      in the array are the attribute names of the composite