Summary

The powerful Perl language is available in PostgreSQL as PL/Perl or PL/Perlu. This allows you to write stored procedures in Perl and to take advantage of all the cool features that Perl has to offer, such as a very large collection of modules available on CPAN. You can do almost everything you want with PL/pgSQL or PL/Python, including database access and writing triggers. The untrusted version of PL/Perl allows you to interact with the environment. PL/Perl will normally outperform PL/pgSQL in non-data intensive functions that focus more on string manipulation and computation.

In the next chapter, we will discuss another popular PL language called Pl/Tcl.

Get PostgreSQL Server Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.