diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-04-30 22:22:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-04-30 22:22:34 +0000 |
commit | c8b5598a116d2d6079f941bcfce7a052f573f5bc (patch) | |
tree | 340ac667f4a4f68ca1413d7ecb0ef2896b771906 /doc/src | |
parent | 955c8771f865c6601f99d9acb6d525a23b637ba2 (diff) | |
download | postgresql-c8b5598a116d2d6079f941bcfce7a052f573f5bc.tar.gz postgresql-c8b5598a116d2d6079f941bcfce7a052f573f5bc.zip |
Document pltcl's return_null command.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/pltcl.sgml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index 59f464aebaf..7d7ceb33792 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.8 2001/03/25 10:16:12 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.9 2001/04/30 22:22:34 tgl Exp $ --> <chapter id="pltcl"> @@ -96,8 +96,10 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types </programlisting> When the function is called, the arguments are given as - variables $1 ... $n to the Tcl procedure body. For example, - a function + variables <literal>$1</literal> ... <literal>$n</literal> to the + Tcl procedure body. The result is returned + from the Tcl code in the usual way, with a <literal>return</literal> + statement. For example, a function returning the higher of two int4 values could be defined as: <programlisting> @@ -107,6 +109,11 @@ CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS ' ' LANGUAGE 'pltcl'; </programlisting> + To return a NULL value from a PL/Tcl function, execute + <literal>return_null</literal>. + </para> + + <para> Composite type arguments are given to the procedure as Tcl arrays. The element names in the array are the attribute names of the composite |