Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ... - Mailing list pgsql-hackers

From BharatDB
Subject Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...
Date
Msg-id CAAh00ER0jXrrC_rQdZAFsVJZemZRs_RBz6kaaMaOnd-oVu4x7w@mail.gmail.com
Whole thread Raw
In response to [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...  (Ian Lawrence Barwick <barwick@gmail.com>)
Responses Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...
List 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@gmail.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
>



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Extended Statistics set/restore/clear functions.
Next
From: Neil Chen
Date:
Subject: Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...