plperl and table/record access

Gordan Bobic <gordan@bobich.net>

From: Gordan Bobic <gordan@bobich.net>
To: psql-general <pgsql-general@postgresql.org>
Date: 2001-10-24T16:14:05Z
Lists: pgsql-general
Hi.

How do I manipulate data in tables from within plperl? Can I, for example, 
issue SQL statements from within plperl functions? I haven't managed to find 
any documentation on this subject. Can anyone point me in the correct 
direction, please? I'm trying to write some trigger functions...

I have seen an example with the plperl function that performs a calculation 
on each row of a table, but it is not explained anywhere how to insert 
records, or how to locate specific records without having to loop through the 
entire database. I presume that DBI will not work, given the need for setting 
up separate database connections, authentication, etc.

Thanks.

Gordan