From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | SF Postgres <sfpug(at)postgresql(dot)org> |
Subject: | Re: DBD::pg error trapping? |
Date: | 2003-02-26 20:01:20 |
Message-ID: | 20030226200120.GG21541@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | sfpug |
On Wed, Feb 26, 2003 at 11:38:48AM -0800, Josh Berkus wrote:
> People,
>
> I know we have a few perl hackers on this list. Can anyone give me a simple
> example of trapping error output from DBD::pg when a query fails? I can't
> seem to get it to work right ... the errors end up being fatal to the Perl
> program.
Do you have some sample code? Blind guess: it may have something to
do with how you're instantiating your database handle, as in
$dbh = DBI->connect("dbi:Pg:dbname=$db", $user, $password,
{RaiseError => 1, PrintError => 1, AutoCommit => 0}
);
You may want to be explicit about the database handle's attributes in
the anonymous hash above. Cf. the DBI and DBD::Pg man pages on what
to stick in the hash.
HTH :)
Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 cell: +1 415 235 3778
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-02-26 20:08:58 | Re: DBD::pg error trapping? |
Previous Message | Aditya | 2003-02-26 19:58:36 | Re: DBD::pg error trapping? |