Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-23 Thread Robert Haas
On Wed, Jul 21, 2010 at 11:13 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jul 22, 2010 at 11:57 AM, Robert Haas robertmh...@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

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-21 Thread Robert Haas
On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas robertmh...@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

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-21 Thread Fujii Masao
On Wed, Jul 21, 2010 at 7:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas robertmh...@gmail.com wrote: OK, committed. When I specify the path of the directory for the

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-21 Thread David Christensen
On Jul 21, 2010, at 8:48 PM, Fujii Masao wrote: On Wed, Jul 21, 2010 at 7:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas robertmh...@gmail.com wrote: OK, committed.

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-21 Thread Robert Haas
On Wed, Jul 21, 2010 at 9:48 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Jul 21, 2010 at 7:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas robertmh...@gmail.com

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-21 Thread Robert Haas
On Wed, Jul 21, 2010 at 10:09 PM, David Christensen da...@endpoint.com wrote: On Jul 21, 2010, at 8:48 PM, Fujii Masao wrote: On Wed, Jul 21, 2010 at 7:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jul 21, 2010 at 1:07 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 20,

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-21 Thread Fujii Masao
On Thu, Jul 22, 2010 at 11:57 AM, Robert Haas robertmh...@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 da...@endpoint.com wrote: If we print the local socket when

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-20 Thread Robert Haas
On Tue, Jul 20, 2010 at 12:16 AM, David Christensen da...@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 robertmh...@gmail.com wrote: On Tue, Jul 20, 2010 at 12:02 AM, David Christensen da...@endpoint.com wrote: I would

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-20 Thread Fujii Masao
On Tue, Jul 20, 2010 at 11:14 PM, Robert Haas robertmh...@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

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread Robert Haas
On Sun, Jul 18, 2010 at 2:00 PM, David Christensen da...@endpoint.com wrote: Updated the commitfest entry with the patch, updated the title to reflect the actual name of the command, and marked as ready for committer. I took a look at this patch. One problem is that it doesn't handle the case

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread David Christensen
On Jul 19, 2010, at 10:34 PM, Robert Haas wrote: On Sun, Jul 18, 2010 at 2:00 PM, David Christensen da...@endpoint.com wrote: Updated the commitfest entry with the patch, updated the title to reflect the actual name of the command, and marked as ready for committer. I took a look at this

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread Robert Haas
On Mon, Jul 19, 2010 at 11:41 PM, David Christensen da...@endpoint.com wrote: I took a look at this patch.  One problem is that it doesn't handle the case where there is no database connection (for example, shut down the database with pg_ctl, then do select 1, then do \conninfo).  I've fixed

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread David Christensen
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

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread Robert Haas
On Tue, Jul 20, 2010 at 12:02 AM, David Christensen da...@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

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread Robert Haas
On Tue, Jul 20, 2010 at 12:07 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 20, 2010 at 12:02 AM, David Christensen da...@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

Re: [HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-19 Thread David Christensen
On Jul 19, 2010, at 11:10 PM, Robert Haas wrote: On Tue, Jul 20, 2010 at 12:07 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 20, 2010 at 12:02 AM, David Christensen da...@endpoint.com wrote: I would propose to print instead: You are connected to database rhaas via local socket

[HACKERS] psql \conninfo command (was: Patch: psql \whoami option)

2010-07-18 Thread David Christensen
On Jul 18, 2010, at 12:33 PM, David Christensen wrote: On Jul 18, 2010, at 12:30 PM, Tom Lane wrote: David Christensen da...@endpoint.com writes: machack:machack:5432=# \c foobar You are now connected to database foobar. What this is reflecting is that backslash commands have their