Re: libpq object hooks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq object hooks
Дата
Msg-id 9303.1210874883@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: libpq object hooks  (Andrew Dunstan <andrew@dunslane.net>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Chernow
Дата:
Сообщение: Re: libpq object hooks
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpq object hooks