DBD::Postgres 

my $attr = {
    RaiseError      => 1,
    pg_enable_utf8  => 1,
};
$dbh = DBI->connect("dbi:Pg:dbname=$dbname", $user, $pswd, $attr);