pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: David Wheeler <david@wheeler.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Silencing NOTICEs in Perl Pg
Date: Thu, 29 Aug 2002 15:02:01 -0500
Message-ID: <20020829200201.GA27531@wolff.to> (raw)
In-Reply-To: <EDF0A75C-BB83-11D6-B671-0003931A964A@wheeler.net>
References: <13A687F0-BB83-11D6-B671-0003931A964A@wheeler.net>
	<EDF0A75C-BB83-11D6-B671-0003931A964A@wheeler.net>

On Thu, Aug 29, 2002 at 12:17:16 -0700,
  David Wheeler <david@wheeler.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.



view thread (21+ messages)  latest in thread

Message-ID: <20020829200201.GA27531@wolff.to>
Permalink:  ../20020829200201.GA27531@wolff.to/
Also on:    postgresql.org/message-id/20020829200201.GA27531@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, david@wheeler.net
  Subject: Re: Silencing NOTICEs in Perl Pg
  In-Reply-To: <20020829200201.GA27531@wolff.to>
  References: <13A687F0-BB83-11D6-B671-0003931A964A@wheeler.net> <EDF0A75C-BB83-11D6-B671-0003931A964A@wheeler.net> <20020829200201.GA27531@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox