SQL queries from within PL/PERL triggers?
I ran across a few questions about this in the mailing list
archive but I did not find any answers. I would like to create a trigger
in PL/PERL that parses out information and sends queries from within the
trigger. The only examples in the manual that use the stored perl
functions return simple values and never send queries. Since the security
features of PL/PERL do not allow for module importing (DBI) I am a bit
clueless as to how this can be done if at all. Has anyone been able to do
this?
Thanks in advance,
Josh Goodman
Hello,
I've seen this question asked several times in the last few months, but
never answered. Perhaps the answer is obvious to some, but unfortunately
it eludes me! It would be very helpful even to hear someone say "no it's
not possible" just to finally know for sure. So if you have any idea at
all, your reply would be most appreciated!
Regards,
Norm
Show quoted text
I ran across a few questions about this in the mailing list
archive but I did not find any answers. I would like to create a trigger
in PL/PERL that parses out information and sends queries from within the
trigger. The only examples in the manual that use the stored perl
functions return simple values and never send queries. Since the security
features of PL/PERL do not allow for module importing (DBI) I am a bit
clueless as to how this can be done if at all. Has anyone been able to do
this?
No, it is not possible, yet.
At one point, I wanted to write it, but then, I became too busy with other
projects, and it fell through.
The Way I wanted to implement it is by writing a DBI driver, DBD::PgSPI
which would look like a normal DBD driver but access database via SPI.
Alternatively, if someone wants to do it, you can just implement a set of
functions (the way elog is implemented in plperl)....
On Fri, 12 Jan 2001, Norman J. Clarke wrote:
Show quoted text
Hello,
I've seen this question asked several times in the last few months, but
never answered. Perhaps the answer is obvious to some, but unfortunately
it eludes me! It would be very helpful even to hear someone say "no it's
not possible" just to finally know for sure. So if you have any idea at
all, your reply would be most appreciated!I ran across a few questions about this in the mailing list
archive but I did not find any answers. I would like to create a trigger
in PL/PERL that parses out information and sends queries from within the
trigger. The only examples in the manual that use the stored perl
functions return simple values and never send queries. Since the security
features of PL/PERL do not allow for module importing (DBI) I am a bit
clueless as to how this can be done if at all. Has anyone been able to do
this?