Subject: | Support DBI's PrintErrorStatement = 1 |
Date: | Wed, 15 Feb 2017 14:23:39 -0800 |
To: | bug-DBD-Pg [...] rt.cpan.org |
From: | Casey & Gina Shobe <caseyandgina [...] icloud.com> |
As shown below, DBD::Pg does not currently honor DBI's PrintErrorStatement = 1 setting:
$ cat test
#!/usr/local/bin/perl
use strict;
use warnings;
use English;
use DBI;
my $database = DBI->connect (
'dbi:Pg:host=localhost;port=5432;dbname=management',
'app_database_management',
'password',
{
AutoCommit => 0,
RaiseError => 1,
PrintError => 0,
ShowErrorStatement => 1
}
);
$database->do ('select 1
+ 3
from
asrocidasoercid');
$ ./test
DBD::Pg::db do failed: ERROR: relation "asrocidasoercid" does not exist
LINE 4: asrocidasoercid
^ at ./test line 19.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle host=localhost;port=5432;dbname=management at ./test line 19.