Re: [PATCH] Add tab-complete for backslash commands - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Add tab-complete for backslash commands
Date
Msg-id 2726976.1630773728@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Add tab-complete for backslash commands  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Responses Re: [PATCH] Add tab-complete for backslash commands
RE: [PATCH] Add tab-complete for backslash commands
List pgsql-hackers
ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:
> I've updated the commitfest entry to Ready for Committer.

I was about to push this but started to have second thoughts about it.
I'm not convinced that offering multiple variant spellings of the same
command is really such a great thing: I'm afraid that it will be more
confusing than helpful.  I particularly question why we'd offer both
single- and multiple-character versions, as the single-character
version seems entirely useless from a completion standpoint.

For example, up to now "\o<TAB>" got you "\o ", which isn't amazingly
useful but maybe it serves to confirm that you typed a valid command.
This patch now forces you to choose between alternative spellings
of the exact same command, which is a waste of effort plus it will
make you stop to wonder whether they really are the same command.
It would be much better to either keep the old behavior, or just
immediately complete to "\out " and stay out of the user's way.

So I'd be inclined to take out the single-character versions of any
commands that we offer a longer spelling of.  I'm not dead set on that,
but I think the possibility ought to be discussed.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: prevent immature WAL streaming
Next
From: Alvaro Herrera
Date:
Subject: Re: prevent immature WAL streaming