From: | Tomas Vondra <tomas(at)vondra(dot)me> |
---|---|
To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
Cc: | 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>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Fix tab completion in v18 for ALTER DATABASE/USER/ROLE ... RESET |
Date: | 2025-07-31 14:09:05 |
Message-ID: | 48d5f407-3bfa-4518-9a73-22d1a6aa0544@vondra.me |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 7/30/25 12:17, Dagfinn Ilmari Mannsåker wrote:
>
> ...
>
>> @@ -5015,7 +5021,8 @@ match_previous_words(int pattern_id,
>> /* Complete with a variable name */
>> else if (TailMatches("SET|RESET") &&
>> !TailMatches("UPDATE", MatchAny, "SET") &&
>> - !TailMatches("ALTER", "DATABASE", MatchAny, "RESET"))
>> + !TailMatches("ALTER", "DATABASE", MatchAny, "RESET") &&
>> + !TailMatches("ALTER", "USER|ROLE", MatchAny, "RESET"))
>> COMPLETE_WITH_QUERY_VERBATIM_PLUS(Query_for_list_of_set_vars,
>> "CONSTRAINTS",
>> "TRANSACTION",
>
> Instead of adding another !TailMatches() call, why not just change
> "DATABASE" to "DATABASE|ROLE|USER"?
It seemed to me separate calls would be easier to understand, but I see
combine it like this in many other places, so done that way ...
Pushed. Thanks for the fixes!
regards
--
Tomas Vondra
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-07-31 14:13:10 | Re: Making type Datum be 8 bytes everywhere |
Previous Message | Tom Lane | 2025-07-31 14:06:02 | Re: Convert varatt.h macros to static inline functions |