On Tue, Nov 14, 2023 at 6:20 AM Bernd Lentes <bernd.lentes@xxxxxxxxxxxxxxxxxxxxx> 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.