Re: Silencing NOTICEs in Perl Pg

From: Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu>
To: "David F(dot) Skoll" <dfs(at)roaringpenguin(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Silencing NOTICEs in Perl Pg
Date: 2002-08-29 18:12:32
Message-ID: Pine.LNX.4.21.0208291411050.27669-100000@perrin.socsci.unc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Sure - when you create the database handle, do:

$dbh =
DBI->connect('dbi:Pg:dbname=<dbname>',"<user>","<password>",{RaiseError=>0});

(use the RaiseError feature)

ap

----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists(at)perrin(dot)socsci(dot)unc(dot)edu * andrew_perrin (at) unc.edu

On Thu, 29 Aug 2002, David F. Skoll wrote:

> Hi,
>
> Libpq has a way to set the notice processor:
> http://www.postgresql.org/idocs/index.php?libpq-control.html
>
> Is there any way from within the Perl Pg module to turn off the printing
> of NOTICEs to stderr? It's a bit annoying in one of my projects.
>
> Regards,
>
> David.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-08-29 18:15:52 Re: Passwords and batch processes (was Re: Problem with Dump)
Previous Message Bruce Momjian 2002-08-29 17:44:20 Re: timeout