Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D66802E0055 for ; Tue, 20 May 2008 00:16:59 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00565-04-2 for ; Tue, 20 May 2008 00:16:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.esilo.com (web-qwest-sterling2.esilo.com [63.150.152.211]) by developer.postgresql.org (Postfix) with ESMTP id 9D7542E005B for ; Tue, 20 May 2008 00:03:52 -0300 (ADT) Received: from [192.168.1.103] (c-65-34-212-214.hsd1.fl.comcast.net [65.34.212.214]) (authenticated bits=0) by mail.esilo.com (8.13.1/8.13.1) with ESMTP id m4K33kmH021228; Mon, 19 May 2008 23:03:46 -0400 Message-ID: <48323F94.6010201@esilo.com> Date: Mon, 19 May 2008 23:03:48 -0400 From: Andrew Chernow User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Tom Lane CC: Merlin Moncure , Andrew Dunstan , Alvaro Herrera , "Patches (PostgreSQL)" Subject: Re: libpq object hooks (libpq events) References: <482A58D8.2030205@dunslane.net> <20080514043313.GS6966@alvh.no-ip.org> <482AD896.4000504@dunslane.net> <19342.1210776271@sss.pgh.pa.us> <482B1480.1070705@esilo.com> <482B2AC5.7000503@esilo.com> <482ECF62.7010901@esilo.com> <12200.1211242959@sss.pgh.pa.us> <48323593.4060302@esilo.com> <13642.1211251078@sss.pgh.pa.us> In-Reply-To: <13642.1211251078@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/396 X-Sequence-Number: 6422 Tom Lane wrote: > Andrew Chernow writes: >> 4. add a setter for result instance data >> - There should also be a PQsetInstanceData(PGconn*, ...) >> - I see no need for a passThrough setter > > Check, though I assume we're not expecting PQsetInstanceData to > propagate to previously created PGresults? > No, not at all. Already created results are on their own. If you want to modify the instanceData, you can use PQresultSetInstanceData. >> 5. move callback stuff to its own header, maybe pgcallback.h? > > Should be libpq-something. I was considering libpq-hooks.h or > libpq-events.h, but libpq-callback.h would be OK too. > I like events. It sounds like you wanted PGCallback, although I am starting to think PGEventProc is better than PGcallback, only because it is more consistent with the term events. BTW, my suggestion to call this libpq events was not directly referring to the callback/proc. It was a term for describing the whole #! I think the idea is to notify interested parties about libpq events, the callback is just an implementaion for doing that. >> Adding PQresultSetInstanceData doesn't removes the need for a resultcreate >> callback event. > > No, of course not. What I was imagining was that the resultcreate > callback would call PQresultSetInstanceData. > Sorry, my mistake. You were actually very clear, my reading skills are in question. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/