From: Ken Kato <katouknl@oss.nttdata.com>
To: pgsql-hackers@lists.postgresql.org
Subject: Tab completion for GRANT MAINTAIN
Date: Tue, 18 Apr 2023 18:08:23 +0900
Message-ID: <6afe7712991882a864d6d10003264e7c@oss.nttdata.com> (raw)
Hi hackers,
I found that GRANT MAINTAIN is not tab-completed with ON, so here is a
patch.
Best wishes,
--
Ken Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Attachments:grant_maintain_tab_completion_v1.patch (text/x-diff, 728B) downloaddiff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.cindex 5825b2a195..bd04244969 100644--- a/src/bin/psql/tab-complete.c+++ b/src/bin/psql/tab-complete.c@@ -3902,7 +3902,7 @@ psql_completion(const char *text, int start, int end)
else if (TailMatches("GRANT|REVOKE", MatchAny) ||
TailMatches("REVOKE", "GRANT", "OPTION", "FOR", MatchAny))
{
- if (TailMatches("SELECT|INSERT|UPDATE|DELETE|TRUNCATE|REFERENCES|TRIGGER|CREATE|CONNECT|TEMPORARY|TEMP|EXECUTE|USAGE|ALL"))+ if (TailMatches("SELECT|INSERT|UPDATE|DELETE|TRUNCATE|REFERENCES|TRIGGER|CREATE|CONNECT|TEMPORARY|TEMP|EXECUTE|USAGE|MAINTAIN|ALL"))
COMPLETE_WITH("ON");
else if (TailMatches("GRANT", MatchAny))
COMPLETE_WITH("TO");
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: katouknl@oss.nttdata.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Tab completion for GRANT MAINTAIN
In-Reply-To: <6afe7712991882a864d6d10003264e7c@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox