Re: libpq object hooks
От | Tom Lane |
---|---|
Тема | Re: libpq object hooks |
Дата | |
Msg-id | 9867.1210877054@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: libpq object hooks (Andrew Chernow <ac@esilo.com>) |
Ответы |
Re: libpq object hooks
Re: libpq object hooks |
Список | pgsql-patches |
Andrew Chernow <ac@esilo.com> writes: > Which callback do we use as the key? Currently, none are required (only > the name was required). We have to choose one callback that must be > provided. What? I thought what you wanted back was the void * pointer that had been registered with a particular callback function. So you use that callback function. If it's not actually registered, you get a NULL. > This is what is passed to PQaddObjectHooks, along with a conn: This is all wrong IMHO, not least because it creates ABI problems if you want to add another hook type later. Register each hook separately, eg typedef void (*PGCRHook) (PGconn *conn, void *passthrough); void PQregisterConnResetHook(PGconn *conn, PQCRHook func, void *passthrough); ... repeat for each possible hook ... regards, tom lane
В списке pgsql-patches по дате отправления: