Re: Silencing NOTICEs in Perl Pg

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: David Wheeler <david(at)wheeler(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Silencing NOTICEs in Perl Pg
Date: 2002-08-29 20:02:01
Message-ID: 20020829200201.GA27531@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Aug 29, 2002 at 12:17:16 -0700,
David Wheeler <david(at)wheeler(dot)net> wrote:
> BTW, I missed the beginning of this thread, but based on the subject,
> I'd sure like to find out if there's a simple way to suppress NOTICEs
> using DBI/DBD::Pg. I've tried a number of tricks, but short of closing
> STDOUT and STDERR in my Perl script, I've not found a way to do it.
> PrintError => 0 doesn't do the trick.

I do the following before doing anything with the database:
open(OLDERR, '>&STDERR');
close(STDERR);
open(STDERR, '>/dev/null');

I then print my error messages to OLDERR instead of STDERR.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-08-29 20:03:09 Re: Interpretting WAL debug.
Previous Message Vilson farias 2002-08-29 19:59:18 Some timestamp problems