Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE
Date: 2018-09-21 08:23:55
Message-ID: CAEepm=1S6ZgrbtyAms5RJHS2OE4v2Sa2XKi7pNc9BC3e4=CSQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 21, 2018 at 5:52 PM Andres Freund <andres(at)anarazel(dot)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 Content-Type Size
0001-Variadic-Matches-.-macros.patch application/octet-stream 126.1 KB
0002-Variadic-COMPLETE_WITH-.-macros.patch application/octet-stream 84.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-09-21 08:51:14 Re: Changing the setting of wal_sender_timeout per standby
Previous Message Pavel Stehule 2018-09-21 08:08:24 proposal: prefix function