Re: Update "usename" in pg_user - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Update "usename" in pg_user
Date
Msg-id CAKFQuwYFFn_H7NMtCrjNz_b4fqTS9K+cBqg7P8dzkncHHWu++A@mail.gmail.com
Whole thread Raw
In response to RE: Update "usename" in pg_user  (Bernd Lentes <bernd.lentes@helmholtz-muenchen.de>)
List pgsql-admin
On Tue, Nov 14, 2023 at 6:20 AM Bernd Lentes <bernd.lentes@helmholtz-muenchen.de> wrote:

thanks. Can I do this for all users in one turn ?

Define "turn".  Each rename is its own command.  But you can put them in a transaction.

Use whatever tooling you use to write and execute SQL to produce dynamic SQL.  psql and its "\gexec" command is nice for the purpose.

David J.

pgsql-admin by date:

Previous
From: Bernd Lentes
Date:
Subject: RE: Update "usename" in pg_user
Next
From: jacob ndinkwa
Date:
Subject: How to configure Repmgr