Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE
Date
Msg-id CAEepm=1S6ZgrbtyAms5RJHS2OE4v2Sa2XKi7pNc9BC3e4=CSQg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE  (Andres Freund <andres@anarazel.de>)
Responses Re: Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Sep 21, 2018 at 5:52 PM Andres Freund <andres@anarazel.de> wrote:
> Here's a very quick-and-dirty implementation of this approach. Some very
> very brief testing seems to indicate it works, although I'm sure not
> perfectly.
>
> The current duplication of the new functions doing the actual checking
> (like CheckMatchesFor(), CheckTailMatchesFor()) would probably need to
> be reduced. But I don't want to invest actual time before we decide that
> this could be something we'd actually want to pursue.

+1

And here is a quick-and-dirty variadic COMPLETE_WITH(...).  Together:

    else if (Matches("PREPARE", MatchAny, "AS"))
        COMPLETE_WITH("SELECT", "UPDATE", "INSERT", "DELETE FROM");

+ * Making C pretty by making it ugly again.

Heh.

-- 
Thomas Munro
http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: proposal: prefix function
Next
From: Michael Paquier
Date:
Subject: Re: Changing the setting of wal_sender_timeout per standby