1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Make plperl's $_TD trigger data a global rather than a lexical variable,

with a fresh local value for each invocation, to avoid unexpected sharing
violations. Per recent -hackers discussion.
This commit is contained in:
Andrew Dunstan
2006-05-29 13:51:23 +00:00
parent b32000eda4
commit 21e343da35
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.53 2006/05/26 17:34:16 adunstan Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.54 2006/05/29 13:51:23 adunstan Exp $ -->
<chapter id="plperl">
<title>PL/Perl - Perl Procedural Language</title>
@ -660,8 +660,9 @@ $$ LANGUAGE plperl;
<para>
PL/Perl can be used to write trigger functions. In a trigger function,
the hash reference <varname>$_TD</varname> contains information about the
current trigger event. The fields of the <varname>$_TD</varname> hash
reference are:
current trigger event. <varname>$_TD</> is a global variable,
which gets a separate local value for each invocation of the trigger.
The fields of the <varname>$_TD</varname> hash reference are:
<variablelist>
<varlistentry>