public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pavel Luzanov <[email protected]>
To: Maiquel Grassi <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: Erik Wienhold <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Psql meta-command conninfo+
Date: Thu, 8 Feb 2024 14:01:55 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CP4P284MB24830F5BF17FFA7F3D733142EC452@CP4P284MB2483.BRAP284.PROD.OUTLOOK.COM>
References: <CP8P284MB24965CB63DAC00FC0EA4A475EC462@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
<20240206181919.GA3853632@nathanxps13>
<aevq2dxmw2xm2rc3nh2wdcozunipco447mf4rpm7efvqvz4wk2@mo3zmf2ulbzu>
<CP8P284MB2496B51FC5ED9BD6527D459DEC462@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
<20240206210605.GA3903769@nathanxps13>
<20240206211205.GA3903996@nathanxps13>
<CP8P284MB24965479BA59DF5C2CC01CA0EC462@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
<20240206215022.GA3452@nathanxps13>
<CP8P284MB2496A17A9852265A0F363A6AEC452@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
<[email protected]>
<CP8P284MB24961361A9C1D32C28A7EC0EEC452@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
<[email protected]>
<CP4P284MB24830F5BF17FFA7F3D733142EC452@CP4P284MB2483.BRAP284.PROD.OUTLOOK.COM>
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
view thread (43+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Psql meta-command conninfo+
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox