11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.18 2002/09/21 18:32:53 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.19 2003/04/07 01:29:25 petere Exp $
33-->
44
55 <chapter id="plperl">
@@ -34,8 +34,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.18 2002/09/21 18:32:53 pete
3434 <note>
3535 <para>
3636 Users of source packages must specially enable the build of
37- PL/Perl during the installation process (refer to the installation
38- instructions for more information). Users of binary packages
37+ PL/Perl during the installation process. (Refer to the installation
38+ instructions for more information.) Users of binary packages
3939 might find PL/Perl in a separate subpackage.
4040 </para>
4141 </note>
@@ -57,8 +57,12 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types
5757 Arguments and results are handled as in any other Perl subroutine:
5858 Arguments are passed in <varname>@_</varname>, and a result value
5959 is returned with <literal>return</> or as the last expression
60- evaluated in the function. For example, a function returning the
61- greater of two integer values could be defined as:
60+ evaluated in the function.
61+ </para>
62+
63+ <para>
64+ For example, a function returning the greater of two integer values
65+ could be defined as:
6266
6367<programlisting>
6468CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS '
@@ -145,7 +149,7 @@ SELECT name, empcomp(employee) FROM employee;
145149 <title>Data Values in PL/Perl</title>
146150
147151 <para>
148- The argument values supplied to a PL/Perl function'sscript are
152+ The argument values supplied to a PL/Perl function'scode are
149153 simply the input arguments converted to text form (just as if they
150154 had been displayed by a <literal>SELECT</literal> statement).
151155 Conversely, the <literal>return</> command will accept any string
@@ -206,8 +210,8 @@ SELECT name, empcomp(employee) FROM employee;
206210 environment. This includes file handle operations,
207211 <literal>require</literal>, and <literal>use</literal> (for
208212 external modules). There is no way to access internals of the
209- databasebackend process or to gain OS-level access with the
210- permissions of the<productname>PostgreSQL</productname> user ID ,
213+ databaseserver process or to gain OS-level access with the
214+ permissions of theserver process ,
211215 as a C function can do. Thus, any unprivileged database user may
212216 be permitted to use this language.
213217 </para>
@@ -227,7 +231,7 @@ CREATE FUNCTION badfunc() RETURNS integer AS '
227231
228232 <para>
229233 Sometimes it is desirable to write Perl functions that are not
230- restricted --- for example, one might want a Perl function that
234+ restricted. For example, one might want a Perl function that
231235 sends mail. To handle these cases, PL/Perl can also be installed
232236 as an <quote>untrusted</> language (usually called
233237 <application>PL/PerlU</application>). In this case the full Perl language is
@@ -255,7 +259,7 @@ CREATE FUNCTION badfunc() RETURNS integer AS '
255259
256260 <para>
257261 The following features are currently missing from PL/Perl, but they
258- would make welcome contributions:
262+ would make welcome contributions.
259263
260264 <itemizedlist>
261265 <listitem>