Re: Tab completion for CREATE SCHEMAAUTHORIZATION
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Suraj Khamkar <khamkarsuraj.b@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2023-04-14T16:04:35Z
Lists: pgsql-hackers
Attachments
- v2-0001-Add-tab-completion-for-CREATE-SCHEMA.patch (text/x-diff)
Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Aug 11, 2021 at 10:16:15AM +0900, Michael Paquier wrote:
>> + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION"))
>> + COMPLETE_WITH_QUERY(Query_for_list_of_owner_roles);
>> + else if (Matches("CREATE", "SCHEMA", MatchAny, "AUTHORIZATION"))
>> + COMPLETE_WITH_QUERY(Query_for_list_of_owner_roles);
>> + else if (Matches("CREATE", "SCHEMA", MatchAny, "AUTHORIZATION", MatchAny))
>> + COMPLETE_WITH("CREATE", "GRANT");
>> + else if (Matches("CREATE", "SCHEMA", MatchAny))
>> + COMPLETE_WITH("AUTHORIZATION", "CREATE", "GRANT");
>> Looks like you forgot the case "CREATE SCHEMA AUTHORIZATION MatchAny"
>> that should be completed by GRANT and CREATE.
>
> This patch has been waiting on author for more than a couple of weeks,
> so I have marked it as returned with feedback in the CF app. Please
> feel free to resubmit if you are able to work more on that.
Looks like I completely dropped the ball on this one, sorry. Here's a
rebased patch which uses the new COMPLETE_WITH_QUERY_PLUS functionality
added in commit 02b8048ba5dc36238f3e7c3c58c5946220298d71.
- ilmari
Commits
-
Add tab completion for CREATE SCHEMA in psql
- c951e9042dd1 17.0 landed
-
psql: improve tab-complete's handling of variant SQL names.
- 02b8048ba5dc 15.0 cited