pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Chernow <ac@esilo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Patches (PostgreSQL) <pgsql-patches@postgresql.org>
Subject: Re: libpq object hooks (libpq events)
Date: Mon, 19 May 2008 23:03:48 -0400
Message-ID: <48323F94.6010201@esilo.com> (raw)
In-Reply-To: <13642.1211251078@sss.pgh.pa.us>
References: <b42b73150804301323i18b00019i62e765708abb65aa@mail.gmail.com>
	<482A58D8.2030205@dunslane.net>
	<20080514043313.GS6966@alvh.no-ip.org>
	<482AD896.4000504@dunslane.net>
	<19342.1210776271@sss.pgh.pa.us>
	<b42b73150805140921v30d24b75m6c230932c61ffdd2@mail.gmail.com>
	<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>

Tom Lane wrote:
> Andrew Chernow <ac@esilo.com> 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/



view thread (15+ messages)  latest in thread

Message-ID: <48323F94.6010201@esilo.com>
Permalink:  ../48323F94.6010201@esilo.com/
Also on:    postgresql.org/message-id/48323F94.6010201@esilo.com

 · 

reply

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-hackers@postgresql.org
  Cc: ac@esilo.com, tgl@sss.pgh.pa.us, mmoncure@gmail.com, andrew@dunslane.net, alvherre@commandprompt.com, pgsql-patches@postgresql.org
  Subject: Re: libpq object hooks (libpq events)
  In-Reply-To: <48323F94.6010201@esilo.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