Re: mprove tab completion for ALTER EXTENSION ADD/DROP - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: mprove tab completion for ALTER EXTENSION ADD/DROP
Date
Msg-id Y41H/RJ1jDBUrtns@paquier.xyz
Whole thread Raw
In response to Re: mprove tab completion for ALTER EXTENSION ADD/DROP  (Matheus Alcantara <mths.dev@pm.me>)
Responses Re: mprove tab completion for ALTER EXTENSION ADD/DROP
List pgsql-hackers
On Sat, Dec 03, 2022 at 05:34:57PM +0000, Matheus Alcantara wrote:
> I've tested your patched on current master and seems to be working properly.
>
> I'm starting reviewing some patches here, let's see what more experience hackers
> has to say about this, but as far I can tell is that is working as expected.

+       /* ALTER EXTENSION <name> ADD|DROP */
+       else if (Matches("ALTER", "EXTENSION", MatchAny, "ADD|DROP"))
+               COMPLETE_WITH("ACCESS METHOD", "AGGREGATE", "CAST", "COLLATION",
+                                         "CONVERSION", "DOMAIN", "EVENT TRIGGER", "FOREIGN",
+                                         "FUNCTION", "MATERIALIZED VIEW", "OPERATOR",
+                                         "PROCEDURAL LANGUAGE", "PROCEDURE", "LANGUAGE",
+                                         "ROUTINE", "SCHEMA", "SEQUENCE", "SERVER", "TABLE",
+                                         "TEXT SEARCH", "TRANSFORM FOR", "TYPE", "VIEW");
+
+       /* ALTER EXTENSION <name> ADD|DROP FOREIGN*/
+       else if (Matches("ALTER", "EXTENSION", MatchAny, "ADD|DROP", "FOREIGN"))
+               COMPLETE_WITH("DATA WRAPPER", "TABLE");

The DROP could be matched with the objects that are actually part of
the so-said extension?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Error-safe user functions
Next
From: Ian Lawrence Barwick
Date:
Subject: doc: add missing "id" attributes to extension packaging page