Re: psql \conninfo command (was: Patch: psql \whoami option) - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: psql \conninfo command (was: Patch: psql \whoami option)
Date
Msg-id AANLkTi=YKHuGsh8ih-F04OJnj+P9byPKug-2Tb1Od8XP@mail.gmail.com
Whole thread Raw
In response to Re: psql \conninfo command (was: Patch: psql \whoami option)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: psql \conninfo command (was: Patch: psql \whoami option)
List pgsql-hackers
On Thu, Jul 22, 2010 at 11:57 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> Should we be using is_absolute_path() here instead, as libpq does?

Yes. The attached patch does that.

>> On Wed, Jul 21, 2010 at 10:09 PM, David Christensen <david@endpoint.com> wrote:
>> If we print the local socket when it's been explicitly set via the host= param, why not display the actual socket
pathin the general local socket case? 
>
> Patch?

Done. DEFAULT_PGSOCKET_DIR (i.e., /tmp) should be displayed in that
case, I think.

    $ psql -c"\conninfo"
    You are connected to database "postgres" via local socket on
"/tmp" at port "5432" as user "postgres".

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: David Christensen
Date:
Subject: Re: Explicit psqlrc
Next
From: Fujii Masao
Date:
Subject: Re: Preliminary review of Synchronous Replication patches