From: | Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br> |
---|---|
To: | "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, 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-03-30 16:23:24 |
Message-ID: | CP8P284MB2496063E9719829163E02ADAEC392@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> For the current patch, I have a few more comments.
> 1/ The output should be reorganized to show the fields that are part of “conninfo” first.
> With regards to the documentation. I think it's a good idea that every field has an
> description. However, I have some comments:
> 1/ For the description of the conninfo command, what about simplifying like below?
> "Outputs a string displaying information about the current database connection. When + is appended, more details about the connection are displayed in table format:"
> 2/ I don't think the descriptions need to start with "Displays". It is very repetitive.
> 3/ For the "Socket Directory" description, this could be NULL if the host was not specified.
> What about the below?
> "The socket directory of the connection. NULL if the host or hostaddr are specified for the connection"
> 4/ For most of the fields, they are just the output of a function, such as "pg_catalog.system_user()". What about the docs simply
> link to the documentation of the function. This way we are not copying descriptions and have to be concerned if the description
> of the function changes in the future.
> 5/ "true" and "false", do not need double quotes. This is not the convention used in other places docs.
-----//-----
Hi Sami!
(v22)
I did everything you mentioned earlier, that is, I followed all your suggestions. However,
I didn't complete item 4. I'm not sure, but I believe that linking it to the documentation
could confuse the user a bit. I chose to keep the descriptions as they were. However, if
you have any ideas on how we could outline it, let me know and perhaps we can
implement it.
Thank you so much!
Exemples:
[postgres(at)localhost bin]$ ./psql -x -p 5000 -h 127.0.0.1
psql (17devel)
Type "help" for help.
postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "127.0.0.1" at port "5000".
postgres=# \conninfo+
Current Connection Information
-[ RECORD 1 ]----------------+----------
Database | postgres
Authenticated User | postgres
Socket Directory |
Host | 127.0.0.1
Server Port | 5000
Server Address | 127.0.0.1
Client Address | 127.0.0.1
Client Port | 33100
Backend PID | 2974
System User |
Current User | postgres
Session User | postgres
Application Name | psql
SSL Connection | f
SSL Protocol |
SSL Cipher |
SSL Compression |
GSSAPI Authenticated | f
GSSAPI Principal |
GSSAPI Encrypted | f
GSSAPI Credentials Delegated | f
postgres=# \q
[postgres(at)localhost bin]$ ./psql -x -p 5432 -h localhost
Password for user postgres:
psql (17devel, server 15.6)
Type "help" for help.
postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "localhost" (address "::1") at port "5432".
postgres=# \conninfo+
Current Connection Information
-[ RECORD 1 ]----------------+----------
Database | postgres
Authenticated User | postgres
Socket Directory |
Host | localhost
Server Port | 5432
Server Address | ::1
Client Address | ::1
Client Port | 57010
Backend PID | 3000
System User |
Current User | postgres
Session User | postgres
Application Name | psql
SSL Connection | f
SSL Protocol |
SSL Cipher |
SSL Compression |
GSSAPI Authenticated | f
GSSAPI Principal |
GSSAPI Encrypted | f
GSSAPI Credentials Delegated |
Regards,
Maiquel Grassi.
Attachment | Content-Type | Size |
---|---|---|
v22-0001-psql-meta-command-conninfo-plus.patch | application/octet-stream | 15.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Dolgov | 2024-03-30 16:58:29 | Re: broken JIT support on Fedora 40 |
Previous Message | Kartyshov Ivan | 2024-03-30 16:14:14 | Re: [HACKERS] make async slave to wait for lsn to be replayed |