Re: SQL command : ALTER DATABASE OWNER TO

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: gparc(at)free(dot)fr, Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL command : ALTER DATABASE OWNER TO
Date: 2024-01-24 16:56:39
Message-ID: 202401241656.hbks4btwvjnf@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 2024-Jan-24, Laurenz Albe wrote:

> The permissions are transferred to the new owner, so the old owner doesn't
> have any privileges on the object (and, in your case, cannot connect to
> the database any more).

However, if the old owner had a pg_hba.conf line that allowed them in,
and the new owner doesn't, then they're now both locked out of the
database with no recourse.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"You don't solve a bad join with SELECT DISTINCT" #CupsOfFail
https://twitter.com/connor_mc_d/status/1431240081726115845

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2024-01-24 17:02:31 Re: SQL command : ALTER DATABASE OWNER TO
Previous Message David G. Johnston 2024-01-24 16:50:17 Re: SQL command : ALTER DATABASE OWNER TO