Re: libpq object hooks - Mailing list pgsql-patches

From Tom Lane
Subject Re: libpq object hooks
Date
Msg-id 9303.1210874883@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq object hooks  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.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

pgsql-patches by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: libpq object hooks
Next
From: Tom Lane
Date:
Subject: Re: libpq object hooks