Prev: [COMMITTERS] pgsql: pgindent run for 9.0, second run
Next: psql \conninfo command (was: Patch: psql \whoami option)
From: Robert Haas on 20 Jul 2010 00:10 On Tue, Jul 20, 2010 at 12:07 AM, Robert Haas <robertmhaas(a)gmail.com> wrote: > On Tue, Jul 20, 2010 at 12:02 AM, David Christensen <david(a)endpoint.com> wrote: >>> I would propose to print instead: >>> >>> You are connected to database "rhaas" via local socket as user "rhaas". >> >> >> One minor quibble here; you lose the ability to see which pg instance you're running on if there are multiple ones running on different local sockets, so maybe either the port or the socket path should show up here still. > > Doh. Will fix. Something like the attached? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
From: Robert Haas on 20 Jul 2010 10:14 On Tue, Jul 20, 2010 at 12:16 AM, David Christensen <david(a)endpoint.com> wrote: > On Jul 19, 2010, at 11:10 PM, Robert Haas wrote: > >> On Tue, Jul 20, 2010 at 12:07 AM, Robert Haas <robertmhaas(a)gmail.com> wrote: >>> On Tue, Jul 20, 2010 at 12:02 AM, David Christensen <david(a)endpoint.com> wrote: >>>>> I would propose to print instead: >>>>> >>>>> You are connected to database "rhaas" via local socket as user "rhaas". >>>> >>>> >>>> One minor quibble here; you lose the ability to see which pg instance you're running on if there are multiple ones running on different local sockets, so maybe either the port or the socket path should show up here still. >>> >>> Doh. �Will fix. >> >> Something like the attached? > > > Looks good to me. OK, committed. Thanks for the patch! -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Fujii Masao on 21 Jul 2010 01:07 On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas <robertmhaas(a)gmail.com> wrote: > OK, committed. When I specify the path of the directory for the Unix-domain socket as the host, \conninfo doesn't mention that this connection is based on the Unix-domain socket. Is this intentional? $ psql -h"/tmp" -c"\conninfo" You are connected to database "postgres" on host "/tmp" at port "5432" as user "postgres". I expected that something like You are connected to database "postgres" via local socket on "/tmp" at port "5432" as user "postgres". is output. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Robert Haas on 21 Jul 2010 06:29 On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao <masao.fujii(a)gmail.com> wrote: > On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas <robertmhaas(a)gmail.com> wrote: >> OK, committed. > > When I specify the path of the directory for the Unix-domain socket > as the host, \conninfo doesn't mention that this connection is based > on the Unix-domain socket. Is this intentional? > > $ psql -h"/tmp" -c"\conninfo" > You are connected to database "postgres" on host "/tmp" at port "5432" > as user "postgres". > > I expected that something like > > � �You are connected to database "postgres" via local socket on > "/tmp" at port "5432" as user "postgres". :-( No, I didn't realize the host field could be used that way. It's true that you get a fairly similar message from \c, but that's not exactly intuitive either. rhaas=# \c - - /tmp - You are now connected to database "rhaas" on host "/tmp". -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Fujii Masao on 21 Jul 2010 21:48 On Wed, Jul 21, 2010 at 7:29 PM, Robert Haas <robertmhaas(a)gmail.com> wrote: > On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao <masao.fujii(a)gmail.com> wrote: >> On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas <robertmhaas(a)gmail.com> wrote: >>> OK, committed. >> >> When I specify the path of the directory for the Unix-domain socket >> as the host, \conninfo doesn't mention that this connection is based >> on the Unix-domain socket. Is this intentional? >> >> $ psql -h"/tmp" -c"\conninfo" >> You are connected to database "postgres" on host "/tmp" at port "5432" >> as user "postgres". >> >> I expected that something like >> >> You are connected to database "postgres" via local socket on >> "/tmp" at port "5432" as user "postgres". > > :-( > > No, I didn't realize the host field could be used that way. It's true > that you get a fairly similar message from \c, but that's not exactly > intuitive either. > > rhaas=# \c - - /tmp - > You are now connected to database "rhaas" on host "/tmp". OK. The attached patch makes \conninfo command emit the following message if the host begins with a slash: $ psql -h/tmp -c"\conninfo" You are connected to database "postgres" via local socket on "/tmp" at port "5432" as user "postgres". Similarly, it makes \c command emit the following message in that case: $ psql -hlocalhost -c"\c - - /tmp -" You are now connected to database "postgres" via local socket on "/tmp". Comments? Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: [COMMITTERS] pgsql: pgindent run for 9.0, second run Next: psql \conninfo command (was: Patch: psql \whoami option) |