On Wed, Jul 12, 2023 at 1:17 PM Gurjeet Singh <gurjeet@xxxxxxxx> wrote:
for rec in select
'alter user '|| quote_ident(usename)
||' with password '|| quote_literal('newpassword')
Which is more clearly written using the format function:
...
for rec in select
format('alter user %I with password %L', usename, 'newpassword')
from pg_user
loop
...
David J.