Re: [PATCH] Tab completion for ALTER TABLE … ADD …

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Tab completion for ALTER TABLE … ADD …
Date: 2021-08-27 10:52:33
Message-ID: 87k0k7upla.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:

> On Tue, Aug 03, 2021 at 12:48:38PM +0100, Dagfinn Ilmari Mannsåker wrote:
>> The other day I noticed that there's no tab completion after ALTER TABLE
>> … ADD, so here's a patch. In addition to COLUMN and all the table
>> constraint types, it also completes with the list of unique indexes on
>> the table after ALTER TABLE … ADD … USING INDEX.
>
> I was reading this patch (not actually tested), and that's a clear
> improvement. One extra thing that could be done here is to complete
> with types for a ALTER TABLE ADD COLUMN foo.

That was easy enough to add (just a bit of extra fiddling to handle
COLUMN being optional), done in the attached v2 patch.

> We could as well have a list of columns after UNIQUE or PRIMARY KEY,
> but that feels like extra cream on top of the cake.

Doing a list of arbitrarily many comma-separated names is more
complicated, so that can be the subject for another patch.

> In short I am fine with what you have here.

Thanks for the review.

- ilmari

Attachment Content-Type Size
v2-0001-Add-tab-completion-for-ALTER-TABLE-ADD.patch text/x-diff 3.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sadhuprasad Patro 2021-08-27 10:57:46 Re: Next Steps with Hash Indexes
Previous Message Vik Fearing 2021-08-27 10:37:59 Re: create table like: ACCESS METHOD