Peter Eisentraut <peter_e@gmx.net> writes:
> Where were we on this? Yes/No/Maybe?
>>
>>>> Instead, when fmgr is setting up to call a setuid function, have it
>>>> insert an extra level of function handler that does the
>>>> save/setup/restore of current UID.
>>
>> I don't quite understand. Do you mean like a PL function handler? But then
>> this thing wouldn't work for external PL's unless we either have a setuid
>> version of each or have nested handlers.
Sorry, I forgot to reply. Nested handlers were exactly what I was
advocating. Or more accurately, *a* nested handler; you'd only need
one regardless of the target function's language. I'm envisioning
that it'd have fn_extra pointing at a block that contains the UID to
be used for the call and the FmgrInfo for the underlying function.
regards, tom lane