Re: Fix tab completion in v18 for ALTER DATABASE/USER/ROLE ... RESET

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: jian he <jian(dot)universality(at)gmail(dot)com>, Robins Tharakan <tharakan(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix tab completion in v18 for ALTER DATABASE/USER/ROLE ... RESET
Date: 2025-07-22 11:18:28
Message-ID: 87ecu8iid7.fsf@wibble.ilmari.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

jian he <jian(dot)universality(at)gmail(dot)com> writes:

> On Thu, Jul 17, 2025 at 1:41 AM Dagfinn Ilmari Mannsåker
> <ilmari(at)ilmari(dot)org> wrote:
>>
>> Hi hackers,
>>
>> These two patches are split out from my earlier thread about improving
>> tab completion for varous RESET forms
>> (https://postgr.es/m/87bjqwwtic.fsf@wibble.ilmari.org) so that the bug
>> fixes can be tracked as an open item for v18.
>>
>> Commits 9df8727c5067 and c407d5426b87 added tab completion for ALTER
>> DATABASE ... RESET and ALTER ROLE/USER ... RESET, respectively, but
>> they're both differently buggy. The query for the DATABASE form
>> neglected to schema-qualify the unnest() call, and the query for the
>> ROLE/USER form shows all possible variables once you start typing a
>> variable name, not just the ones that are set on the role. The attached
>> patches fix both.
>>
>
> I played around with it, and overall it looks good.

Thanks for the review.

I realise I should have included Robins and Tomas in the original mail,
since they were the author and committer, respectively, of the original
patches. I've added them now, and reattached the patches for their
convenience.

- ilmari

Attachment Content-Type Size
0001-Schema-qualify-unnest-call-in-ALTER-DATABASE-.-RESET.patch text/x-diff 1.1 KB
0002-Fix-tab-completion-for-ALTER-ROLE-USER-.-RESET.patch text/x-diff 1.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-07-22 11:19:37 Re: Question on any plans to use the User Server/User Mapping to provide Logical Replication Subscriptions the user/password in an encrypted manner
Previous Message Andrei Lepikhov 2025-07-22 11:13:44 Re: MergeAppend could consider sorting cheapest child path