From: | Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br> |
---|---|
To: | Erik Wienhold <ewie(at)ewie(dot)name>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
Cc: | 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 22:28:29 |
Message-ID: | CP8P284MB249681AA87D9EAF9412439D9EC442@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM |
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.
--//--
Hi Erik,
Exactly, in "\conninfo+" the "pattern" argument was not introduced and
therefore "listConnectionInformation()" can be declared (signed) without
any arguments. In the future, if necessary, and if there is a need to add
any "pattern", then that can be done. However, that's not the current
scenario. I removed everything related to the "pattern" from the patch.
Regarding "(\dS<TAB> actually autocompletes to \ds to my surprise)",
I was also surprised. I haven't studied the code yet to understand why
this happens. It seems curious to me. I'll try to understand this
implementation better.
I'm continuing the development of "\conninfo+" and now moving on to tests.
Tks a lot!
Regards,
Maiquel Grassi.
Attachment | Content-Type | Size |
---|---|---|
v10-0001-psql-meta-command-conninfo-plus.patch | application/octet-stream | 8.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-02-08 23:04:56 | Re: Reducing connection overhead in pg_upgrade compat check phase |
Previous Message | Andres Freund | 2024-02-08 21:41:14 | Re: "ERROR: latch already owned" on gharial |