diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/plperl.sgml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index c4129510fc1..7d17002acff 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.83 2010/04/03 07:22:55 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.84 2010/05/13 16:39:43 adunstan Exp $ --> <chapter id="plperl"> <title>PL/Perl - Perl Procedural Language</title> @@ -1154,11 +1154,19 @@ CREATE TRIGGER test_valid_id_trig into a module and loaded by the <literal>on_init</> string. Examples: <programlisting> -plperl.on_init = '$ENV{NYTPROF}="start=no"; require Devel::NYTProf::PgPLPerl' +plperl.on_init = 'require "plperlinit.pl"' plperl.on_init = 'use lib "/my/app"; use MyApp::PgInit;' </programlisting> </para> <para> + Any modules loaded by <literal>plperl.on_init</>, either directly or + indirectly, will be available for use by <literal>plperl</>. This may + create a security risk. To see what modules have been loaded you can use: +<programlisting> +DO 'elog(WARNING, join ", ", sort keys %INC)' language plperl; +</programlisting> + </para> + <para> Initialization will happen in the postmaster if the plperl library is included in <literal>shared_preload_libraries</> (see <xref linkend="guc-shared-preload-libraries">), in which case extra consideration should be given to the risk of destabilizing the postmaster. |