I am used to Perl "crashing" my script when a SQL goes bad, but Postgres is just giving the error to the Apache error log and the script continues. Evil behaviour for debugging code.
Now I have asked the Oracle of Google but either I am asking the wrong questions or, very unlikely, I am the only one with that problem. ;)
In Short: I want the same fault behaviour with Postgres as MySQL does, ie, "crash" the script and take heed of use CGI::Carp qw(fatalsToBrowser); and just show me the faulty SQL statement.
I am using good old DBI to access the PG-DB, Postgres 8.4 and Perl 5.10.1 on Ubuntu 10.04 on my server, if that matters. All packages are from the official rep.
EDIT: Thanks to Richard Huxton this is solved, leaving the solution for others to find.
our $dbh = DBI->connect($DBUrl, $DBUser, $DBPass,{ RaiseError => 1}
) || die "Could not connect to database: $DBI::errstr";