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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-08-27T04:04:00Z
Lists: pgsql-hackers
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.  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.  In short I am fine with what you have
here.
--
Michael

Commits

  1. Add tab completion for data types after ALTER TABLE ADD [COLUMN] in psql

  2. Add more tab completion support for ALTER TABLE ADD in psql