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

Re: libpq object hooks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Andrew Chernow <ac(at)esilo(dot)com>
Subject: Re: libpq object hooks
Date: 2008-05-15 18:08:03
Message-ID: 9303.1210874883@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> It might work to use the address of the hook callback function as
>> a key for retrieving the associated void * pointer.  You'd need to
>> not register the same callback function more than once per object,
>> but from what I gather here you don't need to.

> Or else have the library return a unique handle when registering hooks, 
> rather than supplying a hook name.

Uh, how would that solve your problem?  Seems like the difficulty
shifts from "how do I get the hook data" to "how do I get the key
with which to get the hook data".

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2008-05-15 18:10:33
Subject: Re: SSL and USER_CERT_FILE
Previous:From: Andrew ChernowDate: 2008-05-15 18:06:06
Subject: Re: libpq object hooks

pgsql-patches by date

Next:From: Tom LaneDate: 2008-05-15 18:19:16
Subject: Re: libpq object hooks
Previous:From: Andrew ChernowDate: 2008-05-15 18:06:06
Subject: Re: libpq object hooks

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