Perl
PostgreSQL already includes the procedural language PL/Perl that can run Perl scripts. Accessing PostgreSQL from an external Perl script, however, requires the use of the Perl database-independent (DBI) module. The Perl DBI defines a set of functions, variables, and conventions to Perl scripts, regardless of what back-end database is actually used.
Perl DBI provides a consistent interface to scripts, resulting in much more portable and flexible code. The DBI is just a general-purpose interface, however; a database driver is still needed to connect to a specific database.
The Perl system does include an older, non-DBI PostgreSQL access module named Pg. However, this is an older module, and most development work recently has gone into the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access