From: | Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> |
---|---|
To: | Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>, Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Erik Wienhold <ewie(at)ewie(dot)name>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Psql meta-command conninfo+ |
Date: | 2024-02-08 11:01:55 |
Message-ID: | f34b2134-85d6-4615-8f3f-e29a2f6f04ab@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 07.02.2024 23:13, Maiquel Grassi wrote:
> Regarding the "system_user" function, as it is relatively new, I added
> the necessary handling to avoid conflicts with versions lower than
> version 16.
>
Yes, that's rights.
A couple of doubts about the implementation details.
But keep in mind that I'm not very good at programming in the C language.
I hope for the help of more experienced developers.
1.
+ if (db == NULL)
+ printf(_("You are currently not connected to a database.\n"));
This check is performed for \conninfo, but not for \conninfo+.
2.
Some values (address, socket) are evaluated separately for \conninfo
(via C functions) and for \conninfo+ (via sql functions).
It may be worth evaluating them in one place. But I'm not sure about that.
The final version of the patch will require changes to the documentation and tests.
--
Pavel Luzanov
Postgres Professional:https://postgrespro.com
From | Date | Subject | |
---|---|---|---|
Next Message | Mats Kindahl | 2024-02-08 11:06:23 | Re: glibc qsort() vulnerability |
Previous Message | Mats Kindahl | 2024-02-08 11:01:22 | Re: glibc qsort() vulnerability |