Re: Update "usename" in pg_user

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bernd Lentes <bernd(dot)lentes(at)helmholtz-muenchen(dot)de>
Cc: "Paul Smith*" <paul(at)pscs(dot)co(dot)uk>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Update "usename" in pg_user
Date: 2023-11-14 13:28:28
Message-ID: CAKFQuwYFFn_H7NMtCrjNz_b4fqTS9K+cBqg7P8dzkncHHWu++A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Nov 14, 2023 at 6:20 AM Bernd Lentes <
bernd(dot)lentes(at)helmholtz-muenchen(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message jacob ndinkwa 2023-11-14 13:28:34 How to configure Repmgr
Previous Message Bernd Lentes 2023-11-14 13:20:10 RE: Update "usename" in pg_user