Re: Proposal: SET ROLE hook

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal: SET ROLE hook
Дата
Msg-id 24215.1457243925@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal: SET ROLE hook  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> I still don't see any point in trying to pass data back from the hooks
> as the extension can maintain that state just fine, although it looks
> like it would be pretty trivial to do using a new void* member added to
> role_auth_extra. Tom (or anyone else), any comment on that?

The point of packaging GUC-related state into a blob that guc.c
knows about is that then the right things will happen when guc.c handles
something like a SET LOCAL, GUC reversion at subtransaction rollback,
SET clauses attached to functions, yadda yadda.  Are you sure your
extension can, or wants to, track all those possibilities for itself?

I remember thinking that we probably would need to extend role_auth_extra
to make this work, so I have no objection if you're finding that that's
actually the case.  Might need to think about how more than one hook
could include state into the blob.

(Note: I've not actually read this version of your patch, although
I could make time for that next week sometime.)
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: How can we expand PostgreSQL ecosystem?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: How can we expand PostgreSQL ecosystem?