Re: Tab completion for CREATE SCHEMAAUTHORIZATION

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: Suraj Khamkar <khamkarsuraj.b@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2021-12-03T01:19:23Z
Lists: pgsql-hackers
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.
--
Michael

Commits

  1. Add tab completion for CREATE SCHEMA in psql

  2. psql: improve tab-complete's handling of variant SQL names.