Re: set role command

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Calvin Guo <newoakllc2023(at)gmail(dot)com>, pg254kl(at)georgiou(dot)vip
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: set role command
Date: 2025-11-27 06:56:46
Message-ID: 916918a4bb3461ae62aed8f01f997d86743d7f53.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-11-27 07:03:20 Re: Question on PostgreSQL Table Partitioning – Performance of Queries That Do Not Use the Partition Key
Previous Message Calvin Guo 2025-11-27 06:25:33 Re: set role command