[PATCH] DROP tab completion

Started by Ken Katoover 4 years ago3 messageshackers
Jump to latest
#1Ken Kato
katouknl@oss.nttdata.com

Hi hackers,

This time, I went through DROP tab completions
and noticed some tab completions missing for the following commands:
-DROP MATERIALIZED VIEW, DROP OWNED BY, DROP POLICY: missing
[CASCADE|RESTRICT] at the end
-DROP TRANSFORM: no completions after TRANSFORM

I made a patch for this.

Best wishes,

--
Ken Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachments:

drop_tab_completion.patchtext/x-diff; charset=us-ascii; name=drop_tab_completion.patchDownload+21-0
#2Asif Rehman
asifr.rehman@gmail.com
In reply to: Ken Kato (#1)
Re: [PATCH] DROP tab completion

The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: tested, passed
Documentation: not tested

The patch applies cleanly and the functionality seems to work well. (master e7122548a3)

The new status of this patch is: Ready for Committer

#3Michael Paquier
michael@paquier.xyz
In reply to: Asif Rehman (#2)
Re: [PATCH] DROP tab completion

On Tue, Nov 30, 2021 at 03:17:07PM +0000, Asif Rehman wrote:

The patch applies cleanly and the functionality seems to work well. (master e7122548a3)

The new status of this patch is: Ready for Committer

+   else if (Matches("DROP", "MATERIALIZED", "VIEW", MatchAny))
+       COMPLETE_WITH("CASCADE", "RESTRICT");
[...]
+   else if (Matches("DROP", "OWNED", "BY", MatchAny))
+       COMPLETE_WITH("CASCADE", "RESTRICT");
This stuff is gathered around line 3284 in tab-complete.c as of HEAD
at 538724f, but I think that you have done things right as there are
already sections for those commands and they have multiple keywords.
So, applied.  Thanks!
--
Michael