]> granicus.if.org Git - postgresql/commitdiff
From: Jan Wieck <jwieck@debis.com>
authorMarc G. Fournier <scrappy@hub.org>
Fri, 13 Feb 1998 17:18:25 +0000 (17:18 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Fri, 13 Feb 1998 17:18:25 +0000 (17:18 +0000)
    just a little correction in the pltcl_guide.nr.

    Sometimes I changed the name of tuple arguments to numbers
    like the other args are. Otherwise it wasn't possible to
    create a function as

        CREATE FUNCTION f (EMP, EMP) ... LANGUAGE 'pltcl';

    The arguments are now accessed in the function as

        $1(name) vs. $2(name)

src/pl/tcl/pltcl_guide.nr

index 87fcc71f747f5f3be793a63c15d7a3c147a94764..6fcd155a4035ecaa13866c837efee7d57a39bdc1 100644 (file)
@@ -121,12 +121,12 @@ from the CREATE FUNCTION section of the manual would be defined in Tcl as
 .in +4
     returns bool as '
 .in +4
-    if {200000.0 < $EMP(salary)} {
+    if {200000.0 < $1(salary)} {
 .in +4
     return 't'
 .in -4
     }
-    if {$EMP(age) < 30 && 100000.0 < $EMP(salary)} {
+    if {$1(age) < 30 && 100000.0 < $1(salary)} {
 .in +4
     return 't'
 .in -4