Skip site navigation (1) Skip section navigation (2)

Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?)

From: Dominic Mitchell <dom(at)semantico(dot)com>
To: David Wheeler <david(at)wheeler(dot)net>
Cc: Rudy Lippan <rlippan(at)remotelinux(dot)com>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,pgsql-interfaces(at)postgresql(dot)org, 'DBI developers' <dbi-dev(at)perl(dot)org>
Subject: Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?)
Date: 2003-05-29 15:44:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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].


In response to

pgsql-interfaces by date

Next:From: Jeff SilberbergDate: 2003-05-30 01:51:51
Subject: Maybe Off Topic -- PGACCESS
Previous:From: David WheelerDate: 2003-05-29 15:36:28
Subject: Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group