Re: set role command - Mailing list pgsql-general

From Laurenz Albe
Subject Re: set role command
Date
Msg-id 916918a4bb3461ae62aed8f01f997d86743d7f53.camel@cybertec.at
Whole thread Raw
In response to Re: set role command  (Calvin Guo <newoakllc2023@gmail.com>)
List pgsql-general
On Thu, 2025-11-27 at 14:25 +0800, Calvin Guo wrote:
> create role usera_sandbox in group usera;
> \c - usera_sandbox
> but what will happen if I then issue:
> reset role?

Nothing will happen.

\c disconnects the superuser session and establishes a new connection,
so there is nothing to reset to.

> Seems like once I connect as a super user, there is no way for drop the previledge.

Precisely.  That's why you don't connect as a superuser, unless you
need to for administrative purposes.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Calvin Guo
Date:
Subject: Re: set role command
Next
From: Laurenz Albe
Date:
Subject: Re: Question on PostgreSQL Table Partitioning – Performance of Queries That Do Not Use the Partition Key