|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
<!-- |
|
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.3 2000/03/31 06:17:21 thomas Exp $ |
|
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.4 2000/05/09 18:30:43 momjian Exp $ |
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
<chapter id="pl-perl"> |
|
|
|
|
@ -101,7 +101,7 @@ SELECT name, totalcomp(basesalary, bonus) from employee |
|
|
|
|
<programlisting> |
|
|
|
|
CREATE FUNCTION empcomp(employee) returns int4 |
|
|
|
|
AS 'my $emp = shift; |
|
|
|
|
return $emp->{'basesalary'} + $emp->{'bonus'};' |
|
|
|
|
return $emp->{''basesalary''} + $emp->{''bonus''};' |
|
|
|
|
LANGUAGE 'plperl'; |
|
|
|
|
</programlisting> |
|
|
|
|
A tuple is passed as a reference to hash. The keys are the names of |
|
|
|
|
|