Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...

From: BharatDB <bharatdbpg(at)gmail(dot)com>
To: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: "Carpenter(dot)nail(dot)cz(at)gmail(dot)com" <Carpenter(dot)nail(dot)cz(at)gmail(dot)com>
Subject: Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...
Date: 2025-11-25 09:16:11
Message-ID: CAAh00ER0jXrrC_rQdZAFsVJZemZRs_RBz6kaaMaOnd-oVu4x7w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ian,

+1 for the patch,LGTM

But after applying the patch i can be able to apply all the results
except the reset options user variables

postgres=#
postgres=# alter role bob
BYPASSRLS CREATEROLE INHERIT NOCREATEDB
NOLOGIN PASSWORD RESET
VALID UNTIL
CONNECTION LIMIT ENCRYPTED PASSWORD LOGIN
NOCREATEROLE NOREPLICATION RENAME TO SET
WITH
CREATEDB IN DATABASE NOBYPASSRLS NOINHERIT
NOSUPERUSER REPLICATION SUPERUSER
postgres=# alter role bob in DATABASE
postgres template0 template1
postgres=# alter role bob in DATABASE postgres
RESET SET
postgres=# alter role bob in DATABASE postgres reset ALL

postgres=# alter role bob in DATABASE postgres reset ALL

also i cross verified that my system doesn't have variables so it
returns 0 rows?but:

postgres=# SELECT name FROM pg_settings LIMIT 5;
name
----------------------------
allow_alter_system
allow_in_place_tablespaces
allow_system_table_mods
application_name
archive_cleanup_command
(5 rows)

Can you check this ?

-regards

Vasuki M

On Fri, Nov 21, 2025 at 8:44 AM Ian Lawrence Barwick <barwick(at)gmail(dot)com> wrote:
>
> Hi
>
> I found myself needing to work with ALTER ROLE ... IN DATABASE ... recently
> and was annoyed by the lack of tab completion for this, so patch attached.
>
>
> Regards
>
> Ian Barwick
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Chen 2025-11-25 09:36:31 Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...
Previous Message VASUKI M 2025-11-25 09:11:32 Re: BUG #19095: Test if function exit() is used fail when linked static