From: Dominic Mitchell <dom@semantico.com>
To: David Wheeler <david@wheeler.net>
Cc: Rudy Lippan <rlippan@remotelinux.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-interfaces@postgresql.org, 'DBI developers' <dbi-dev@perl.org>
Subject: Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?)
Date: Thu, 29 May 2003 16:44:10 +0100
Message-ID: <3ED62ACA.90307@semantico.com> (raw)
In-Reply-To: <505BBD9E-91EB-11D7-975B-0003931A964A@wheeler.net>
References: <505BBD9E-91EB-11D7-975B-0003931A964A@wheeler.net>
David Wheeler wrote:
> On Thursday, May 29, 2003, at 02:00 AM, Dominic Mitchell wrote:
>
>> One more thing for the change log: notice messages generated by the
>> database now use the perl warning mechanism instead of going to
>> stderr, so they can be trapped if needed.
>
>
> Oh, sweet! How did you do that? I've been doing this to catch them:
>
> <hack caveat="ugly">
>
> open STDERR, "| perl -ne 'print unless /: NOTICE: /'"
> or die "Cannot pipe STDERR: $!\n";
>
> </hack>
Just hook up the existing libpq function PQsetNoticeProcessor() to a
XS's warn in dbdimp.c. It's about 5 lines of code. I don't know
whether it's 100% correct (I'm no XS guru), but it Works For Me[tm].
-Dom
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: dom@semantico.com, david@wheeler.net, rlippan@remotelinux.com, pgman@candle.pha.pa.us, dbi-dev@perl.org
Subject: Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?)
In-Reply-To: <3ED62ACA.90307@semantico.com>
* 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