Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 075D74769CF for ; Thu, 29 Aug 2002 15:58:59 -0400 (EDT) Received: from wolff.to (wolff.to [66.92.219.49]) by postgresql.org (Postfix) with SMTP id 32D374769CE for ; Thu, 29 Aug 2002 15:58:58 -0400 (EDT) Received: (qmail 27559 invoked by uid 500); 29 Aug 2002 20:02:01 -0000 Date: Thu, 29 Aug 2002 15:02:01 -0500 From: Bruno Wolff III To: David Wheeler Cc: pgsql-admin@postgresql.org Subject: Re: Silencing NOTICEs in Perl Pg Message-ID: <20020829200201.GA27531@wolff.to> Mail-Followup-To: David Wheeler , pgsql-admin@postgresql.org References: <13A687F0-BB83-11D6-B671-0003931A964A@wheeler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/378 X-Sequence-Number: 5492 On Thu, Aug 29, 2002 at 12:17:16 -0700, David Wheeler 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.