Re: SET ROLE versus SET SESSION AUTHORIZATION

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: colinthart(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: SET ROLE versus SET SESSION AUTHORIZATION
Date: 2024-01-31 11:12:03
Message-ID: 75a5f0f99356c263fedd8a02d3072e04d4073f84.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, 2024-01-30 at 17:25 +0000, PG Doc comments form wrote:
> Page: https://www.postgresql.org/docs/16/sql-set-role.html
> Description:
>
> "SET ROLE has effects comparable to SET SESSION AUTHORIZATION, but the
> privilege checks involved are quite different."
>
> What are the differences in privilege checks?
>
> How are the two commands the same and different, semantically?

The difference is revealed by "SELECT session_user".

I think that is pretty clearly described in the SET SESSION AUTHORIZATION
documentation page.

Yours,
Laurenz Albe

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2024-01-31 11:15:31 Re: create table explicitly mention that unique|primary key constraint will create an
Previous Message Peter Eisentraut 2024-01-31 11:11:38 Re: create table explicitly mention that unique|primary key constraint will create an