X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 855C6924DB5 for ; Fri, 30 May 2003 10:13:18 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 04088-05 for ; Fri, 30 May 2003 10:13:13 -0400 (EDT) Received: from semantico.com (choke.semantico.com [212.74.15.98]) by developer.postgresql.org (Postfix) with ESMTP id E0E2D921BC0 for ; Fri, 30 May 2003 10:13:12 -0400 (EDT) Received: from spampd.localdomain (localhost [127.0.0.1]) by localhost.semantico.com (Postfix) with ESMTP id 35BE0320060; Fri, 30 May 2003 15:13:06 +0100 (BST) Received: from semantico.com (cassia.dyn.rp.lan [192.168.1.236]) by semantico.com (Postfix) with ESMTP id 0A155320060; Fri, 30 May 2003 15:13:04 +0100 (BST) Message-ID: <3ED766F0.2070707@semantico.com> Date: Fri, 30 May 2003 15:13:04 +0100 From: Dominic Mitchell Organization: Semantico User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tim Bunce Cc: Rudy Lippan , Bruce Momjian , David Wheeler , pgsql-interfaces@postgresql.org, 'DBI developers' Subject: Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?) References: <3ED5CC25.70102@semantico.com> <20030530090401.GG6818@dansat.data-plan.com> <3ED7224B.7030101@semantico.com> <20030530140313.GP6818@dansat.data-plan.com> In-Reply-To: <20030530140313.GP6818@dansat.data-plan.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-102.5 required=5.0 tests=CARRIAGE_RETURNS,IN_REP_TO,NOSPAM_INC,QUOTED_EMAIL_TEXT, REFERENCES,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MOZILLA_UA,USER_IN_WHITELIST,X_ACCEPT_LANG version=2.44 X-Spam-Level: X-Virus-Scanned: by amavisd-new X-Archive-Number: 200306/5 X-Sequence-Number: 4216 Tim Bunce wrote: > On Fri, May 30, 2003 at 10:20:11AM +0100, Dominic Mitchell wrote: >>See, I told you I wasn't an XS guru. :-) >> >>Actually, I looked at this, but my limited C and DBI skills couldn't >>work out a) what the required handle was (probably dbh) > > > Just whatever handle was used to call the method that's generating the warning. > > >>and b) how to pass that into the PQsetNoticeProcessor function as data >>and get it out again. > > > Ah, different issue. For that I'd say if DBIc_WARN(imp_xxh) isn't true > then disable the PQsetNoticeProcessor function. Well, we're calling PQsetNoticeProcessor[1], from inside dbd_db_login, so I should be able to pass in imp_dbh as the "arg" argument. The bit that I wasn't sure about before was what to cast it to in order to retrieve it from a void *. >>I'll happily take another look though, now that it's been brought up as >>desirable. > > > Actually I'd misunderstood the circumstances of the warn (not reading > your message carefully enough). For notice messages generated by > the database server they'll soon(ish) be a $h->{HandleEvent} = sub { ... } > hook that should be used. How will that work? Is that for any sort of asynchronous message from the database? > But that'll bring you back to needing some way for the PQsetNoticeProcessor > function to get at the handle data it'll need to pass to the HandleEvent > hook. The PQsetNoticeProcessor API ought to allow you to some way to do that. It does, I just couldn't figure it out in the 30 minutes I spent looking at it. I need to go back and spend more time with the docs and less being lazy. :-) -Dom [1] Damn mozilla for not being emacs[2]. I want dynamic-abbrevs! [2] Or vim. That does it too.