Re: Psql meta-command conninfo+

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Psql meta-command conninfo+
Date: 2024-02-08 20:37:54
Message-ID: gdgfqn2kuxp6w635bzz35me45a5zsswdcmqciuylui5dxxgmmd@par2aijoq4jw
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024-02-08 20:37 +0100, Jim Jones wrote:
> One thing I just noticed. The psql autocomplete feature does not suggest
> the new + option of \conninfo. For instance, when typing "\connin[TAB]"
> it automatically autocompletes to "\conninfo ". I guess it should also
> be included in this patch.

Modifiers such as + or S in \dS are not covered by autocompletion.
src/bin/psql/tab-complete.c only specifies backslash commands in their
basic form (without modifiers).

(\dS<TAB> actually autocompletes to \ds to my surprise)

> I can do a more thorough review of the code when you add the
> documentation and tests to the patch.

I noticed that the pattern parameter in listConnectionInformation is
unused. exec_command_conninfo scans the pattern but \conninfo should
not accept any argument. So the pattern can be removed entirely.

--
Erik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-02-08 20:39:29 Re: glibc qsort() vulnerability
Previous Message Mats Kindahl 2024-02-08 20:35:56 Re: glibc qsort() vulnerability