|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Joe Conway <mail(at)joeconway(dot)com>|
|Cc:||Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>|
|Subject:||Re: Proposal: SET ROLE hook|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Joe Conway <mail(at)joeconway(dot)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
|Next Message||Craig Ringer||2016-03-06 05:59:34||Re: How can we expand PostgreSQL ecosystem?|
|Previous Message||Mark Kirkwood||2016-03-06 05:46:41||Re: How can we expand PostgreSQL ecosystem?|