Re: [PATCH] Connection time for \conninfo

2020-03-16 Thread David Steele
On 3/16/20 10:59 AM, Juan José Santamaría Flecha wrote: On Mon, Mar 16, 2020 at 1:24 PM David Steele > wrote: On 3/14/20 3:16 PM, Rodrigo Ramírez Norambuena wrote: > > I forgot about that ... It passed a little time from my new pushed > changes. So

Re: [PATCH] Connection time for \conninfo

2020-03-16 Thread Juan José Santamaría Flecha
On Mon, Mar 16, 2020 at 1:24 PM David Steele wrote: > On 3/14/20 3:16 PM, Rodrigo Ramírez Norambuena wrote: > > > > I forgot about that ... It passed a little time from my new pushed > > changes. So go ahead :) > > This patch has been returned with feedback. Please feel free to resubmit > in a

Re: [PATCH] Connection time for \conninfo

2020-03-16 Thread David Steele
On 3/14/20 3:16 PM, Rodrigo Ramírez Norambuena wrote: I forgot about that ... It passed a little time from my new pushed changes. So go ahead :) This patch has been returned with feedback. Please feel free to resubmit in a future CF when you believe the feedback has been addressed.

Re: [PATCH] Connection time for \conninfo

2020-03-14 Thread Rodrigo Ramírez Norambuena
Hi There! I forgot about that ... It passed a little time from my new pushed changes. So go ahead :) On Tue, Mar 10, 2020 at 3:15 PM Stephen Frost wrote: > > Greetings, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Stephen Frost writes: > > > Anyway, I don't anticipate having time to do

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Anyway, I don't anticipate having time to do anything with this patch > > but I disagree that this is a "we don't want it" kind of thing, rather > > we maybe want it, since someone cared enough to write a patch, but

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 2020-03-10 18:38, Stephen Frost wrote: > >>On 2/27/20 4:21 AM, Peter Eisentraut wrote: > >>>My opinion is that this is not particularly useful and not appropriate to > >>>piggy-back onto \conninfo.  Connection

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Tom Lane
Stephen Frost writes: > Anyway, I don't anticipate having time to do anything with this patch > but I disagree that this is a "we don't want it" kind of thing, rather > we maybe want it, since someone cared enough to write a patch, but the > patch needs work and maybe we want it to look a bit

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Peter Eisentraut
On 2020-03-10 18:38, Stephen Frost wrote: On 2/27/20 4:21 AM, Peter Eisentraut wrote: My opinion is that this is not particularly useful and not appropriate to piggy-back onto \conninfo.  Connection information including host, port, database, user name is a well-established concept in

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > On 2/27/20 4:21 AM, Peter Eisentraut wrote: > >My opinion is that this is not particularly useful and not appropriate to > >piggy-back onto \conninfo.  Connection information including host, port, > >database, user name is a

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread David Steele
Hi Rodrigo, On 2/27/20 4:21 AM, Peter Eisentraut wrote: My opinion is that this is not particularly useful and not appropriate to piggy-back onto \conninfo.  Connection information including host, port, database, user name is a well-established concept in PostgreSQL programs and tools and it

Re: [PATCH] Connection time for \conninfo

2020-02-27 Thread Peter Eisentraut
My opinion is that this is not particularly useful and not appropriate to piggy-back onto \conninfo. Connection information including host, port, database, user name is a well-established concept in PostgreSQL programs and tools and it contains a delimited set of information. Knowing what

Re: [PATCH] Connection time for \conninfo

2019-09-07 Thread Rodrigo Ramírez Norambuena
On Thu, Sep 5, 2019 at 2:22 PM Tom Lane wrote: > > =?UTF-8?Q?Rodrigo_Ram=C3=ADrez_Norambuena?= writes: > > On Tue, Sep 3, 2019 at 11:06 PM Michael Paquier wrote: > >> You can do basically the same thing by looking at > >> pg_stat_activity.backend_start and compare it with the clock > >>

Re: [PATCH] Connection time for \conninfo

2019-09-05 Thread Tom Lane
=?UTF-8?Q?Rodrigo_Ram=C3=ADrez_Norambuena?= writes: > On Tue, Sep 3, 2019 at 11:06 PM Michael Paquier wrote: >> You can do basically the same thing by looking at >> pg_stat_activity.backend_start and compare it with the clock >> timestamp. Doing it at SQL level the way you want has also the >>

Re: [PATCH] Connection time for \conninfo

2019-09-05 Thread Rodrigo Ramírez Norambuena
On Wed, Sep 4, 2019 at 11:04 AM Alvaro Herrera wrote: > > The only thing that seems wrong about this proposal is that the time > format is a bit too verbose. I would have it do "N days 12:23:34". > Hi Alvaro!, I attach a second version with this change. -- Rodrigo Ramírez Norambuena

Re: [PATCH] Connection time for \conninfo

2019-09-05 Thread Rodrigo Ramírez Norambuena
On Tue, Sep 3, 2019 at 11:06 PM Michael Paquier wrote: > > You can do basically the same thing by looking at > pg_stat_activity.backend_start and compare it with the clock > timestamp. Doing it at SQL level the way you want has also the > advantage to offer you a modular format output. Hi

Re: [PATCH] Connection time for \conninfo

2019-09-04 Thread Alvaro Herrera
On 2019-Sep-04, Michael Paquier wrote: > On Tue, Sep 03, 2019 at 10:13:57PM -0400, Rodrigo Ramírez Norambuena wrote: > > I've work in the a little patch to add into the \conninfo of psql > > command the connection time against a server backend > > > > Maybe could add after, the precheck to if

Re: [PATCH] Connection time for \conninfo

2019-09-03 Thread Michael Paquier
On Tue, Sep 03, 2019 at 10:13:57PM -0400, Rodrigo Ramírez Norambuena wrote: > I've work in the a little patch to add into the \conninfo of psql > command the connection time against a server backend > > Maybe could add after, the precheck to if the connection is alive. > I've take first look to

[PATCH] Connection time for \conninfo

2019-09-03 Thread Rodrigo Ramírez Norambuena
I've work in the a little patch to add into the \conninfo of psql command the connection time against a server backend Maybe could add after, the precheck to if the connection is alive. I've take first look to the pqPacketSend, my idea is send a ECHO packet over to the database connection. If