Perl Database Interface (DBI) is a generic database interface to talk to specific database back-end. DBD::Pg is a PostgreSQL driver which enables Perl applications to interact with PostgreSQL database through DBI.
For more information, see the following: