Re: Proposal: SET ROLE hook - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: SET ROLE hook
Date
Msg-id 24215.1457243925@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: SET ROLE hook  (Joe Conway <mail@joeconway.com>)
List 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 by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: How can we expand PostgreSQL ecosystem?
Next
From: Craig Ringer
Date:
Subject: Re: How can we expand PostgreSQL ecosystem?