Re: Psql meta-command conninfo+

2025-06-15 Thread Peter Eisentraut
On 12.06.25 17:28, Alvaro Herrera wrote: On 2025-Jun-12, Peter Eisentraut wrote: This new code uses the term "TLS" where the rest of PostgreSQL, including the rest of psql, uses the term "SSL". Making this different seems uselessly confusing. I suggest the attached patch to use "SSL" here as

Re: Psql meta-command conninfo+

2025-06-12 Thread Alvaro Herrera
On 2025-Jun-12, Peter Eisentraut wrote: > This new code uses the term "TLS" where the rest of PostgreSQL, including > the rest of psql, uses the term "SSL". Making this different seems > uselessly confusing. I suggest the attached patch to use "SSL" here as > well. Sure, let's do that for now.

Re: Psql meta-command conninfo+

2025-06-12 Thread Peter Eisentraut
On 21.02.25 19:19, Alvaro Herrera wrote: I suggest the attached, which gets 99% there with 10% of the complexity, and has \conninfo (no plus sign) output this: Connection Information Parámetro │ Valor ───┼ Base de

Re: Psql meta-command conninfo+

2025-02-26 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > On 2025-Feb-22, Alvaro Herrera wrote: > >> Also, there's a bunch of "(char *)" casts that are 100% due to >> printTableAddCell() taking a char * instead of const char * for the cell >> value. That seems a bit silly, we should change that. > > Ah, but the problem is that

Re: Psql meta-command conninfo+

2025-02-25 Thread Alvaro Herrera
On 2025-Feb-22, Alvaro Herrera wrote: > Also, there's a bunch of "(char *)" casts that are 100% due to > printTableAddCell() taking a char * instead of const char * for the cell > value. That seems a bit silly, we should change that. Ah, but the problem is that most of the input cells there come

Re: Psql meta-command conninfo+

2025-02-22 Thread Alvaro Herrera
On 2025-Feb-21, Sami Imseih wrote: > > If we want to include 'role' in this output, what I'd propose is to > > have \conninfo issue "SHOW role", which is accepted by every server > > version. If it fails (say because we're in an aborted transaction), > > just omit that row from the output. > > v

Re: Psql meta-command conninfo+

2025-02-21 Thread Sami Imseih
> If we want to include 'role' in this output, what I'd propose is to > have \conninfo issue "SHOW role", which is accepted by every server > version. If it fails (say because we're in an aborted transaction), > just omit that row from the output. v37- would have handled this as the list of PQ pa

Re: Psql meta-command conninfo+

2025-02-21 Thread Tom Lane
Sami Imseih writes: >> Maybe keeping track of 'role' via ParameterStatus messages is a good >> idea for reasons unrelated to this patch -- maybe it can be useful for >> applications to be aware of role changes -- but I'm not 100% sure about >> that, and in particular I'm not sure how heavy the pro

Re: Psql meta-command conninfo+

2025-02-21 Thread Sami Imseih
> Maybe keeping track of 'role' via ParameterStatus messages is a good > idea for reasons unrelated to this patch -- maybe it can be useful for > applications to be aware of role changes -- but I'm not 100% sure about > that, and in particular I'm not sure how heavy the protocol traffic is > going

Re: Psql meta-command conninfo+

2025-02-21 Thread Maiquel Grassi
>You don't get "There were only 99 Luftballons" or any such nonsense, and I >don't see why \conninfo gets to play different rules. So I got rid of >\conninfo+. >From my perspective across this, I support this approach. Regards, Maiquel.

Re: Psql meta-command conninfo+

2025-02-21 Thread Tom Lane
Alvaro Herrera writes: > Do people hate the question marks? They feel not per our usual style. I think the output would be equally readable without them. Otherwise, +1 for this general approach. I agree we can just kick the current output format to the curb. regards, t

Re: Psql meta-command conninfo+

2025-02-21 Thread Alvaro Herrera
I suggest the attached, which gets 99% there with 10% of the complexity, and has \conninfo (no plus sign) output this: Connection Information Parámetro │ Valor ───┼ Base de Datos │ alvherre Client Use

Re: Psql meta-command conninfo+

2025-01-21 Thread Hunaid Sohail
Hi, On Mon, Jan 20, 2025 at 6:34 PM Maiquel Grassi wrote: > >That leads me to also wonder why don't we change \conninfo to have this > >tabular behavior instead of creating a separate command for it. Why do > >we need to keep the existing form of \conninfo? To me it seems strictly > >less usef

Re: Psql meta-command conninfo+

2025-01-20 Thread Maiquel Grassi
>That leads me to also wonder why don't we change \conninfo to have this >tabular behavior instead of creating a separate command for it. Why do >we need to keep the existing form of \conninfo? To me it seems strictly >less useful, as it is harder to read. Here, you're suggesting that it would b

Re: Psql meta-command conninfo+

2025-01-20 Thread Alvaro Herrera
On 2025-Jan-17, Sami Imseih wrote: > > Wait a second, why do we have these here? Aren't they already in > > \dconfig? > > \dconfig is generated by querying pg_settings and this > requires a halthy connection. The parameters being proposed with > \conninfo+ are set in libpq by the server [1] and

Re: Psql meta-command conninfo+

2025-01-17 Thread Sami Imseih
> Wait a second, why do we have these here? Aren't they already in > \dconfig? \dconfig is generated by querying pg_settings and this requires a halthy connection. The parameters being proposed with \conninfo+ are set in libpq by the server [1] and can be retrieved even if the connection breaks.

Re: Psql meta-command conninfo+

2025-01-16 Thread Hunaid Sohail
Hi, On Thu, Jan 16, 2025 at 6:01 PM Alvaro Herrera wrote: > On 2025-Jan-16, Hunaid Sohail wrote: > > > server_encoding | UTF8 > > server_version| 18devel > > client_encoding | UTF8 > > session_authorization | hunaid > > standard_conforming

Re: Psql meta-command conninfo+

2025-01-16 Thread Alvaro Herrera
On 2025-Jan-16, Hunaid Sohail wrote: > server_encoding | UTF8 > server_version| 18devel > client_encoding | UTF8 > session_authorization | hunaid > standard_conforming_strings | on > DateStyle | ISO, MDY > scram_itera

Re: Psql meta-command conninfo+

2025-01-16 Thread Hunaid Sohail
Hi, I have attached 3 new patches v37-000* which display the \conninfo+ output as 2 columns "Parameter" and "Value". The other 2 patches are: 1. A new libpq function, PQparameterNames, which returns names of parameters reported by the server. 2. Mark role as GUC_REPORT. All these patches include

Re: Psql meta-command conninfo+

2025-01-14 Thread Dean Rasheed
On Tue, 14 Jan 2025 at 08:51, Alvaro Herrera wrote: > > On 2025-Jan-14, Hunaid Sohail wrote: > > > I've tried the approach and attached the output. Does this look good? > > Hmm, I'm not sure I like the third column particularly; it's noisy to > have on all the time. I'd leave that for \conninfo+

Re: Psql meta-command conninfo+

2025-01-14 Thread Alvaro Herrera
On 2025-Jan-14, Hunaid Sohail wrote: > I'm not attaching the patch as it requires some formatting. Remember pgindent formats code in bulk. A quick useful workflow is to do that first, apply manual adjustments next, run pgindent again afterwards. > I've tried the approach and attached the output

Re: Psql meta-command conninfo+

2025-01-13 Thread Hunaid Sohail
Hi, On Mon, Jan 13, 2025 at 4:12 PM Dean Rasheed wrote: > I don't like the 3-table format either. I think it should be a single > table. > > The trouble with v35 is that it produces 1 row with lots of columns, > which is pretty unreadable unless expanded mode is used. So I think we > should just

Re: Psql meta-command conninfo+

2025-01-13 Thread Dean Rasheed
On Mon, 13 Jan 2025 at 08:44, Alvaro Herrera wrote: > > > IMO, we should continue with v35 and add all parameters from > > PQparameterStatus, > > as Sami suggested. The names themselves are informative enough. > > IMO we need more opinions. Maybe enough other people are not as unhappy > about the

Re: Psql meta-command conninfo+

2025-01-13 Thread Alvaro Herrera
On 2025-Jan-10, Hunaid Sohail wrote: > IMO, we should continue with v35 and add all parameters from > PQparameterStatus, > as Sami suggested. The names themselves are informative enough. IMO we need more opinions. Maybe enough other people are not as unhappy about the three-table solution. --

Re: Psql meta-command conninfo+

2025-01-09 Thread Hunaid Sohail
Hi, On Fri, Jan 10, 2025 at 1:50 AM Sami Imseih wrote: > > If we go with the 3 column format, then we will just > > have a bunch of repeated values for Category, which > > looks cluttered, IMO. > > "cluttered" is maybe the wrong description. I meant the output > will look overwhelming due to the

Re: Psql meta-command conninfo+

2025-01-09 Thread Sami Imseih
> If we go with the 3 column format, then we will just > have a bunch of repeated values for Category, which > looks cluttered, IMO. "cluttered" is maybe the wrong description. I meant the output will look overwhelming due to the repeated values :) Regards, Sami

Re: Psql meta-command conninfo+

2025-01-09 Thread Sami Imseih
> I dislike totally discarding the category information we have available to > us. How about making a long output with just three columns in non-expanded > mode. Setting, Value, Category ? We can probably make due without a category as the name of the setting is informative enough, right? If

Re: Psql meta-command conninfo+

2025-01-09 Thread David G. Johnston
On Thu, Jan 9, 2025 at 12:28 PM Sami Imseih wrote: > > v35 seems fine to me from a UI standpoint; I suggest we move forward > > with that. > > I am also OK with moving forward with a single \conninfo+, but > I think we should include all parameters in [1] as part of the output. > These are the pa

Re: Psql meta-command conninfo+

2025-01-09 Thread Sami Imseih
> v35 seems fine to me from a UI standpoint; I suggest we move forward > with that. I am also OK with moving forward with a single \conninfo+, but I think we should include all parameters in [1] as part of the output. These are the parameters the server reports back to the client. I think they are

Re: Psql meta-command conninfo+

2025-01-09 Thread Alvaro Herrera
On 2024-Dec-26, Maiquel Grassi wrote: > The previous version was good to go and ready for a commit as soon as > the final review is finalized. About David’s proposal, I’m still a > little unsure, but it seems like it has a lot of potential. What do > you all think? If it’s a strong direction to ex

Re: Psql meta-command conninfo+

2025-01-09 Thread Sami Imseih
> If we loop through conn->pstatus, we will be bypassing the official API. > The list is of type pgParameterStatus, which is an internal struct defined in > libpq-int.h. > As the file's header warns, including this file can lead to issues. Or am I > missing something? you're right about the warn

Re: Psql meta-command conninfo+

2025-01-08 Thread Hunaid Sohail
Hi, After looking at this ever more today, I think "Server Parameter Settings" > is confusing as well. I think "Connection Status" instead of > "Current Status" as is defined in v36 will work better. > This way we will have "Connection Info" and "Connection Status". > Connection Status will reflec

Re: Psql meta-command conninfo+

2025-01-07 Thread Sami Imseih
>> I think "Connection Encryption" seems unnecessary here as >> well and it could be added to "Connection Information". > > > Yes, we can do that, but we’d be left with two tables: > "Connection Information" and "Server Parameter Settings". Does that work? After looking at this ever more today, I

Re: Psql meta-command conninfo+

2025-01-07 Thread Hunaid Sohail
Hi, Thank you for your valuable feedback. 1/ I am having a hard time making sense of the section "Current Status" > None of the values in that section can be changed in the lifetime > of a connection. The description "Current Status" makes it > seem like they can change. > Any suggestions? 2/ C

Re: Psql meta-command conninfo+

2025-01-06 Thread Sami Imseih
I spent time reviewing v36 today and I have some comments. Overall I think it's in better shape and the value of being able to get this information from a single command meta-command is really useful. But I have some comments. Sorry if I am re-hashing things that have already been discussed. 1/ I

RE: Psql meta-command conninfo+

2024-12-26 Thread Maiquel Grassi
>Hi, > >I provided a patch a month ago with a new approach as suggested by David. >Unfortunately, it didn't get any attention in the November CF. > >I would appreciate your feedback on whether we should proceed with this new >approach or stick with the previous one. > >Regards, >Hunaid Sohail --/

Re: Psql meta-command conninfo+

2024-12-12 Thread Hunaid Sohail
Hi, I provided a patch a month ago with a new approach as suggested by David. Unfortunately, it didn't get any attention in the November CF. I would appreciate your feedback on whether we should proceed with this new approach or stick with the previous one. Regards, Hunaid Sohail

Re: Psql meta-command conninfo+

2024-10-30 Thread Hunaid Sohail
If it only ends up being a few of them then keeping those in > the status table makes sense. > > David J. > >> From 5fc7a9b2a80933641b67c30b5909a0aed810f0cd Mon Sep 17 00:00:00 2001 From: Hunaid Sohail Date: Wed, 30 Oct 2024 10:44:21 +0500 Subject: [PATCH v36] Add psql meta comma

Re: Psql meta-command conninfo+

2024-10-07 Thread David G. Johnston
On Sun, Oct 6, 2024 at 11:17 PM Hunaid Sohail wrote: > > PQpass - no need > I would include this as presence/absence. I concur on all of the rest. > > For PQparameterStatus, some parameters are already used. > server_version and application_name were already discussed and removed in > v12 and

Re: Psql meta-command conninfo+

2024-10-06 Thread Hunaid Sohail
Hi David, Thank you for your feedback. On Fri, Oct 4, 2024 at 11:56 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > It seems to me a more useful definition for what this command should print > out is basically the entire contents of: > > https://www.postgresql.org/docs/current/libpq-

Re: Psql meta-command conninfo+

2024-10-03 Thread David G. Johnston
On Thursday, October 3, 2024, Hunaid Sohail wrote: > > > Authenticated User: The name of the user returned by PQuser(), indicating > the user who initiated or authenticated the current database connection. > Session User: The session user's name, which is initially the same as the > authenticated

Re: Psql meta-command conninfo+

2024-10-03 Thread Hunaid Sohail
Hi, On Thu, Oct 3, 2024 at 1:39 PM Maiquel Grassi wrote: > >I thought it would be nice to have a description that tells how both > >Session and Authenticated users differ. IMHO *only* a reference to > >PQuser() doesn't say much, but others might be ok with it. So let's see > >what the other revi

RE: Psql meta-command conninfo+

2024-10-03 Thread Maiquel Grassi
>I thought it would be nice to have a description that tells how both >Session and Authenticated users differ. IMHO *only* a reference to >PQuser() doesn't say much, but others might be ok with it. So let's see >what the other reviewers say. Hi everyone, I believe the difference between Session an

Re: Psql meta-command conninfo+

2024-10-02 Thread Jim Jones
On 02.10.24 06:48, Hunaid Sohail wrote: > Should I revert to the v34 docs for Session User, or is it fine as is? What I tried to say is that the current description is a bit vague --- specially "Authenticated User". > Authenticated User: The name of the user returned by PQuser() > Session User

Re: Psql meta-command conninfo+

2024-10-01 Thread Hunaid Sohail
Hi, On Tue, Oct 1, 2024 at 10:50 AM Jim Jones wrote: > Right. I meant "Session User" > > > Authenticated User: The name of the user returned by PQuser() > > Session User: The session user's name. > Should I revert to the v34 docs for Session User, or is it fine as is? Session User: The session

Re: Psql meta-command conninfo+

2024-09-30 Thread Jim Jones
On 01.10.24 06:27, Hunaid Sohail wrote: > There are two users in the conninfo+: 'session' and 'authenticated'. > Both are documented. Right. I meant "Session User" > Authenticated User: The name of the user returned by PQuser() > Session User: The session user's name. Thanks -- Jim

Re: Psql meta-command conninfo+

2024-09-30 Thread Hunaid Sohail
Hi, On Mon, Sep 30, 2024 at 11:16 PM Jim Jones wrote: > On 26.09.24 09:15, Hunaid Sohail wrote: > > This patch renames "Current User" to "Authenticated User" as suggested > > by me in my last email. I have also updated the documentation > accordingly. > > Could you perhaps in the documentation e

Re: Psql meta-command conninfo+

2024-09-30 Thread Jim Jones
Hi On 26.09.24 09:15, Hunaid Sohail wrote: > This patch renames "Current User" to "Authenticated User" as suggested > by me in my last email. I have also updated the documentation accordingly. Could you perhaps in the documentation elaborate a bit more on the difference between "Current User" and

Re: Psql meta-command conninfo+

2024-09-26 Thread Hunaid Sohail
Hi, This patch renames "Current User" to "Authenticated User" as suggested by me in my last email. I have also updated the documentation accordingly. On Tue, Sep 17, 2024 at 4:53 PM Hunaid Sohail wrote: > We can update the docs as follows: > Authenticated User: The name of the user returned by

Re: Psql meta-command conninfo+

2024-09-17 Thread Hunaid Sohail
Hi, On Mon, Sep 16, 2024 at 8:31 PM Tom Lane wrote: > Alvaro Herrera writes: > > On 2024-Sep-16, Jim Jones wrote: > >> * The value of "Current User" does not match the function current_user() > >> --- as one might expcect. It is a little confusing, as there is no > >> mention of "Current User"

Re: Psql meta-command conninfo+

2024-09-16 Thread Tom Lane
Alvaro Herrera writes: > On 2024-Sep-16, Jim Jones wrote: >> * The value of "Current User" does not match the function current_user() >> --- as one might expcect. It is a little confusing, as there is no >> mention of "Current User" in the docs. In case this is the intended >> behaviour, could you

Re: Psql meta-command conninfo+

2024-09-16 Thread Alvaro Herrera
On 2024-Sep-16, Jim Jones wrote: > * The value of "Current User" does not match the function current_user() > --- as one might expcect. It is a little confusing, as there is no > mention of "Current User" in the docs. In case this is the intended > behaviour, could you please add it to the docs?

Re: Psql meta-command conninfo+

2024-09-16 Thread Jim Jones
On 16.09.24 08:51, Hunaid Sohail wrote: > I have attached a new patch that now prints all info in tabular format > for \conninfo+. I have also made the table output dynamic, so if the > connection uses SSL, the columns in the table will expand accordingly. > It looks much cleaner now. > I have a

Re: Psql meta-command conninfo+

2024-09-15 Thread Hunaid Sohail
Hi, On Sat, Sep 14, 2024 at 10:50 PM Tom Lane wrote: > Alvaro Herrera writes: > > I don't understand why this is is printing half the information in > > free-form plain text and the other half in tabular format. All these > > items that you have in the free-form text lines should be part of th

Re: Psql meta-command conninfo+

2024-09-14 Thread Tom Lane
Alvaro Herrera writes: > I don't understand why this is is printing half the information in > free-form plain text and the other half in tabular format. All these > items that you have in the free-form text lines should be part of the > table, I think. +1, that was my reaction as well. I can se

Re: Psql meta-command conninfo+

2024-09-14 Thread Alvaro Herrera
On 2024-Sep-14, Hunaid Sohail wrote: > I agree that both messages should be printed together. IMO the message > "You are connected to database..." should be printed at the top, no? > Because it shows important info that the user may be interested to see > first. Then we can combine the ssl message

Re: Psql meta-command conninfo+

2024-09-14 Thread Hunaid Sohail
Hi Jim, On Fri, Sep 13, 2024 at 4:27 PM Jim Jones wrote: > I just noticed that messages' order has been slightly changed. The > message "You are connected to database "postgres" as user "hunaid" via > socket in "/tmp" at port "5430" used to be printed after the table, and > now it is printed bef

Re: Psql meta-command conninfo+

2024-09-13 Thread Jim Jones
On 13.09.24 06:49, Hunaid Sohail wrote: > > $ bin/psql --port=5430 postgres > psql (18devel) > Type "help" for help. > > postgres=# \conninfo+ > You are connected to database "postgres" as user "hunaid" via socket > in "/tmp" at port "5430". >                                                   Co

Re: Psql meta-command conninfo+

2024-09-12 Thread Hunaid Sohail
RECORD 1 ]+--- Protocol Version | 3 SSL Connection | no GSSAPI Authenticated | no Client Encoding | UTF8 Server Encoding | UTF8 Session User | hunaid Backend PID | 55598 ``` Regards, Hunaid Sohail From b011b1cc780fee4030147070db84dcc62edd10a9 Mon

Re: Psql meta-command conninfo+

2024-09-12 Thread Jim Jones
On 11.09.24 13:35, Hunaid Sohail wrote: > Hi Jim, > > On Wed, Sep 11, 2024 at 3:03 PM Jim Jones > wrote: > > Thanks for working on this. > > Any particular reason for the design change? In v28 it returned a > table > with a single row and multiple columns --- one column per >

Re: Psql meta-command conninfo+

2024-09-11 Thread Hunaid Sohail
Hi Jim, On Wed, Sep 11, 2024 at 3:03 PM Jim Jones wrote: > Thanks for working on this. > > Any particular reason for the design change? In v28 it returned a table > with a single row and multiple columns --- one column per attribute. But > now it returns multiple rows. In this case, I was expect

Re: Psql meta-command conninfo+

2024-09-11 Thread Jim Jones
On 11.09.24 10:16, Hunaid Sohail wrote: I have made the requested changes. Now output is returned in tabular form. Indentation/whitespace issues are fixed. $bin/psql --port=5430 postgres postgres=# \conninfo+ You are connected to database "postgres" as user "hunaid" via socket in "/tmp" at p

Re: Psql meta-command conninfo+

2024-09-11 Thread Hunaid Sohail
Hi, On Tue, Sep 10, 2024 at 9:16 PM Alvaro Herrera wrote: > On 2024-Sep-10, Jim Jones wrote: > > > Is \conninfo+ no longer supposed to return the results in tabular form? > > At least it wasn't the case till v28. > > I suspect the reason it's no longer a table is that it was previously a > query

Re: Psql meta-command conninfo+

2024-09-10 Thread Alvaro Herrera
On 2024-Sep-10, Jim Jones wrote: > Is \conninfo+ no longer supposed to return the results in tabular form? > At least it wasn't the case till v28. I suspect the reason it's no longer a table is that it was previously a query (which is easily printed as a table by calling printQuery) and now it's

Re: Psql meta-command conninfo+

2024-09-10 Thread Jim Jones
er Encoding: UTF8 Session User: jim Backend PID: 579087 Sorry if I missed that in the thread. v31 has a couple of small indentation problems: /home/jim/patches/conninfo/v31-0001-Add-psql-meta-command-conninfo-plus.patch:87: indent with spaces.     show_verbose = strchr(cmd, '+') ? true :

Re: Psql meta-command conninfo+

2024-09-09 Thread Hunaid Sohail
is > obsolete. Please consider migrating to /etc/jail.conf. > === applying patch ./v30-0001-psql-meta-command-conninfo-plus.patch > patch unexpectedly ends in middle of line > gpatch: Only garbage was found in the patch input. > > > I will set the status to "Waiting on A

Re: Psql meta-command conninfo+

2024-09-09 Thread Jim Jones
QL commit ID d8df7ac5c04cd17bf13bd3123dcfcaf8007c6280 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. === applying patch ./v30-0001-psql-meta-command-conninfo-plus.patch patch unexpectedly ends in middle of line gpatc

Re: Psql meta-command conninfo+

2024-08-02 Thread Hunaid Sohail
Hi, I have read the entire thread discussion. I understood the importance of this enhancement related to /conninfo+ meta command. I really appreciate the efforts of Maiquel and suggestions made by the reviewers. According to best of my understanding, libpq API should be used instead of creating se

RE: Psql meta-command conninfo+

2024-06-05 Thread Maiquel Grassi
>From a quick skim of the latest messages in this thread, it sounds like there are a couple of folks who think \conninfo (and consequently \conninfo+) should only report values from the libpq API. I think they would prefer server-side information to be provided via a system view or maybe an entire

Re: Psql meta-command conninfo+

2024-06-03 Thread Nathan Bossart
On Wed, May 29, 2024 at 12:37:21PM +, Maiquel Grassi wrote: > Is there someone willing to help me with this development and guide the > patch so that it can be committed one day? >From a quick skim of the latest messages in this thread, it sounds like there are a couple of folks who think \con

RE: Psql meta-command conninfo+

2024-05-29 Thread Maiquel Grassi
Hi, Is there someone willing to help me with this development and guide the patch so that it can be committed one day? Regards, Maiquel.

Re: Psql meta-command conninfo+

2024-04-05 Thread Imseih (AWS), Sami
> The original \conninfo was designed to report values from the libpq API > about what libpq connected to. And the convention in psql is that "+" > provide more or less the same information but a bit more. So I think it > is wrong to make "\conninfo+" something fundamentally different than > "\conn

Re: Psql meta-command conninfo+

2024-04-05 Thread Peter Eisentraut
On 04.04.24 18:15, Maiquel Grassi wrote: Well, I can revert \conninfo to its original state and keep \conninfo+ as it is, perhaps removing the application name, as I believe everything else is important for a DBA/SysAdmin. Do you think we can proceed with the patch this way? I am open to ideas th

Re: Psql meta-command conninfo+

2024-04-04 Thread Imseih (AWS), Sami
> The point about application_name is a valid one. I guess it's there > because it's commonly given from the client side rather than being set >server-side, even though it's still a GUC. Arguably we could remove it > from \conninfo+, and claim that nothing that shows up in \dconfig should > also ap

Re: Psql meta-command conninfo+

2024-04-04 Thread Alvaro Herrera
On 2024-Apr-04, Peter Eisentraut wrote: > But I don't really see the point of this. The information you are querying > is already available in various system views. This proposal is just a > shorthand for a collection of various random things some people like to see. > Like, by what reason is ap

RE: Psql meta-command conninfo+

2024-04-04 Thread Maiquel Grassi
Hi! (v29) I left the command \conninfo in its original form. I removed the 'Application Name' column from the \conninfo+ command. Thanks, Maiquel Grassi. v29-0001-psql-meta-command-conninfo-plus.patch Description: v29-0001-psql-meta-command-conninfo-plus.patch

RE: Psql meta-command conninfo+

2024-04-04 Thread Maiquel Grassi
>> The existing \conninfo command gets its values from libpq APIs. You are >> changing all of this to make a server query, which is a totally >> different thing. If we wanted to take a change like this, I don't think >> it should be reusing the \conninfo command. FWIW, I agree with Peter's conce

Re: Psql meta-command conninfo+

2024-04-04 Thread Tom Lane
Maiquel Grassi writes: >> The existing \conninfo command gets its values from libpq APIs. You are >> changing all of this to make a server query, which is a totally >> different thing. If we wanted to take a change like this, I don't think >> it should be reusing the \conninfo command. FWIW, I

RE: Psql meta-command conninfo+

2024-04-04 Thread Maiquel Grassi
The existing \conninfo command gets its values from libpq APIs. You are changing all of this to make a server query, which is a totally different thing. If we wanted to take a change like this, I don't think it should be reusing the \conninfo command. But I don't really see the point of this. T

Re: Psql meta-command conninfo+

2024-04-04 Thread Peter Eisentraut
The existing \conninfo command gets its values from libpq APIs. You are changing all of this to make a server query, which is a totally different thing. If we wanted to take a change like this, I don't think it should be reusing the \conninfo command. But I don't really see the point of this

RE: Psql meta-command conninfo+

2024-04-04 Thread Maiquel Grassi
| f SSL Protocol | SSL Cipher | SSL Compression | GSSAPI Authenticated | f GSSAPI Principal | GSSAPI Encrypted | f GSSAPI Credentials Delegated | f Regards, Maiquel Grassi. v28-0001-psql-meta-command-conninfo-plus.patch Description: v28-0001-psql-meta-command-conninfo-plus.patch

RE: Psql meta-command conninfo+

2024-04-04 Thread Maiquel Grassi
context; see the current_user() function in for more details. ---//--- Hi Sami! (v27) I made the adjustment in the documentation. Thank you for the time dedicated to this feature. Regards, Maiquel Grassi. v27-0001-psql-meta-command-conninfo

Re: Psql meta-command conninfo+

2024-04-03 Thread Imseih (AWS), Sami
Building the docs fail for v26. The error is: ref/psql-ref.sgml:1042: element member: validity error : Element term is not declared in member list of possible children ^ I am able to build up to v24 before the was replaced with I tested building with a mod

RE: Psql meta-command conninfo+

2024-04-03 Thread Maiquel Grassi
n > for more details. I updated the patch. Thank you for this help. Regards, Maiquel Grassi. v26-0001-psql-meta-command-conninfo-plus.patch Description: v26-0001-psql-meta-command-conninfo-plus.patch

Re: Psql meta-command conninfo+

2024-04-01 Thread Imseih (AWS), Sami
> Here I considered your suggestion (Sami and Álvaro's). However, I haven't yet > added the links for the functions system_user(), current_user(), and > session_user(). > 'm not sure how to do it. Any suggestion on how to create/add the link? Here is an example [1] where the session information f

RE: Psql meta-command conninfo+

2024-04-01 Thread Maiquel Grassi
behavior of the function is not > great. Here I considered your suggestion (Sami and Álvaro's). However, I haven't yet added the links for the functions system_user(), current_user(), and session_user(). I'm not sure how to do it. Any suggestion on how to create/add the link? Regards, Maiquel Grassi. v25-0001-psql-meta-command-conninfo-plus.patch Description: v25-0001-psql-meta-command-conninfo-plus.patch

RE: Psql meta-command conninfo+

2024-04-01 Thread Maiquel Grassi
Database: The database name of the connection. Authenticated User: The authenticated database user of the connection. Socket Directory: The Unix socket directory of the connection. NULL if host or hostaddr are specified. Host: The host name or address of the connection. NULL if a Unix

Re: Psql meta-command conninfo+

2024-04-01 Thread Imseih (AWS), Sami
> That minor point aside, I disagree with Sami about repeating the docs > for system_user() here. I would just say "The authentication data > provided for this connection; see the function system_user() for more > details." +1. FWIW; Up the thread [1], I did mention we should link to the function

Re: Psql meta-command conninfo+

2024-04-01 Thread Alvaro Herrera
Hello Yeah, that's what I meant about the translations, thanks. Two more comments, - You don't need a two-level conditional here if (pset.sversion >= 90500) { if (pset.sversion < 14) appendPQExpBuffer(&buf,

RE: Psql meta-command conninfo+

2024-04-01 Thread Maiquel Grassi
Hi! (v24) > I meant those columns to be just examples, but this should be applied to > all the other columns in the output as well. Applied the translation to all columns. Regards, Maiquel Grassi. v24-0001-psql-meta-command-conninfo-plus.patch Description: v24-0001-psql-meta-command-co

Re: Psql meta-command conninfo+

2024-04-01 Thread Alvaro Herrera
On 2024-Mar-31, Maiquel Grassi wrote: > Yes Álvaro, I have already appointed you as the patch reviewer. > It's true, even before publishing it on Commifest, you have > already provided good ideas and guidance. Thanks. > I adjusted the translation syntax for the SSL and GSSAPI columns. > After yo

Re: Psql meta-command conninfo+

2024-03-31 Thread Imseih (AWS), Sami
>. 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.

RE: Psql meta-command conninfo+

2024-03-31 Thread Maiquel Grassi
| 52966 Backend PID | 1693 System User | Current User | postgres Session User | postgres Application Name | psql SSL Connection | f SSL Protocol | SSL Cipher | SSL Compres

Re: Psql meta-command conninfo+

2024-03-30 Thread Alvaro Herrera
Hello, Note that, in the patch as posted, the column names are not translatable. In order to be translatable, the code needs to do something like appendPQExpBuffer(&buf, " NULL AS \"%s\",\n" " NULL AS \"%s\",\n" " NULL AS \"%s\",\n"

RE: Psql meta-command conninfo+

2024-03-30 Thread Maiquel Grassi
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. v22-0001-psql-meta-command-conninfo-plus.patch Description: v22-0001-psql-meta-command-conninfo-plus.patch

Re: Psql meta-command conninfo+

2024-03-28 Thread Imseih (AWS), Sami
Thank you for the updated patch. First and foremost, thank you very much for the review. > The initial and central idea was always to keep the metacommand > "\conninfo" in its original state, that is, to preserve the string as it is. > The idea of "\conninfo+" is to expand this to include more in

RE: Psql meta-command conninfo+

2024-03-28 Thread Maiquel Grassi
| SSL Connection | f SSL Protocol | SSL Cipher | SSL Compression | GSSAPI Authenticated | f GSSAPI Principal | GSSAPI Encrypted | f GSSAPI Credentials Delegated | f Regards, Maiquel Grassi. v21-0001-psql-meta-command-conninfo-plus.patch Description: v21-0001-psql-meta-command-conninfo-plus.patch

Re: Psql meta-command conninfo+

2024-03-27 Thread Imseih (AWS), Sami
Hi, Thanks for working on this. I have a few comments about the current patch. 1/ I looked through other psql-meta commands and the “+” adds details but does not change output format. In this patch, conninfo and conninfo+ have completely different output. The former is a string with all the deta

RE: Psql meta-command conninfo+

2024-03-27 Thread Maiquel Grassi
> Hi Nathan! > > Sorry for the delay, I was busy with other professional as well as personal > activities. > I made all the changes you suggested. I removed the variables and started > using > views "pg_stat_ssl" and "pg_stat_gssapi". I handled the PostgreSQL versioning > regarding the views u

RE: Psql meta-command conninfo+

2024-03-18 Thread Maiquel Grassi
tgres Session User | postgres Backend PID| 29007 Server Address | Server Port | 5433 Client Address | Client Port| Socket Directory | /tmp Host | GSSAPI | f SSL Connection | f SSL Protocol | SSL Cipher | SSL Compression| Rergards, Maiquel Grassi. v20-0001-psql-meta-command-conninfo-plus.patch Description: v20-0001-psql-meta-command-conninfo-plus.patch

  1   2   >