On Wed, Jun 26, 2024 at 2:42 PM David G. Johnston
wrote:
> On Wednesday, June 26, 2024, Dominique Devienne wrote:
>> Only session_user
>> is representative of the caller, and reliable (modulo SUPERUSER and
>> SET AUTHORIZATION, but that's a different story and kinda normal)
>
> Why can you not us
On Wed, 26 Jun 2024 at 08:42, David G. Johnston
wrote:
> On Wednesday, June 26, 2024, Dominique Devienne
> wrote:
>
>> Only session_user
>> is representative of the caller, and reliable (modulo SUPERUSER and
>> SET AUTHORIZATION, but that's a different story and kinda normal)
>>
>
> Why can you
On Wednesday, June 26, 2024, Dominique Devienne wrote:
> Only session_user
> is representative of the caller, and reliable (modulo SUPERUSER and
> SET AUTHORIZATION, but that's a different story and kinda normal)
>
Why can you not use session_user then?
David J.
On Wed, Jun 26, 2024 at 12:11 PM wrote:
> Dominique Devienne:
> > 1) Is there any way to know the current_role of the caller of a
> > DEFINER function. I fear the answer is no, but better be sure from
> > experts here.
>
> You can do something like this:
>
> CREATE DOMAIN current_user_only AS text
Dominique Devienne:
1) Is there any way to know the current_role of the caller of a
DEFINER function. I fear the answer is no, but better be sure from
experts here.
You can do something like this:
CREATE DOMAIN current_user_only AS text
CONSTRAINT current_user_only CHECK (VALUE = CURRENT_USE
On 2024-06-26 10:35 +0200, Dominique Devienne wrote:
> Hi. I was led to believe (by an hallucination...) that I could know
> the current_role of the caller of a DEFINER function, but after actual
> experimentation, turns out it shows the OWNER of the function, and not
> the current_role of the call
On Wed, 2024-06-26 at 10:35 +0200, Dominique Devienne wrote:
> So I have two questions:
> 1) Is there any way to know the current_role of the caller of a
> DEFINER function. I fear the answer is no, but better be sure from
> experts here.
> 2) Why isn't there a way to obtain the above? What harm wo
Hi. I was led to believe (by an hallucination...) that I could know
the current_role of the caller of a DEFINER function, but after actual
experimentation, turns out it shows the OWNER of the function, and not
the current_role of the caller.
I foolishly thought curent_role != current_user inside t