Hi,
On 11/29/24 09:42, Robins Tharakan wrote:
> Hi,
>
> Please find attached a patch to help tab completion show only currently
> set vars
> during ALTER USER RESET.
>
> Currently tab completion provides a list of all vars which is only
> partially helpful.
> This patch allows tab completion to see which vars are currently set for
> the role
> and only show those options during tab completion.
>
Yeah, this looks convenient. Without the patch we'd get
...
Display all 200 possibilities? (y or n)
and then a wall of text with all the options. With the patch we get only
options that are actually set for the user, which is much better.
Two comments:
1) Does it make sense to still show "ALL" when the query returns
nothing? Not sure if we already have a way to handle this.
2) Should we do the same thing for ALTER DATABASE? That also allows
setting options.
thanks
--
Tomas Vondra