On Thu, May 31, 2012 at 9:11 PM, Magnus Hagander <mag...@hagander.net> wrote: > On Thu, May 31, 2012 at 9:04 PM, Bruce Momjian <br...@momjian.us> wrote: >> On startup, psql shows the SSL information: >> >> $ psql 'sslmode=require host=localhost' >> psql (9.2beta1) >> SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) >> >> However, \conninfo does not mention SSL: >> >> postgres=> \conninfo >> You are connected to database "postgres" as user "postgres" on >> host "localhost" at port "5432". >> >> Should \conninfo mention SSL? Fortunately \c shows SSL information: >> >> postgres=> \c >> SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) >> You are now connected to database "postgres" as user "postgres". > > Well, \c creates a new connection, so that's not really an information > command. It might not connect that trivially, depending on what > authentication method you use. > > Including ssl info in \conninfo would be useful, I think. > > //Magnus >
A one-line change adds the SSL info on its own line like ------ You are connected to database "scratch" as user "scratch" on host "127.0.0.1" at port "5432". SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) ------ Does this need a more integrated presentation, and therefore a broader change to make it translatable? Regards, Alastair. *** a/src/bin/psql/command.c --- b/src/bin/psql/command.c *************** exec_command(const char *cmd, *** 312,319 **** --- 312,322 ---- printf(_("You are connected to database \"%s\" as user \"%s\" via socket in \"%s\" at port \"%s\".\n"), db, PQuser(pset.db), host, PQport(pset.db)); else + { printf(_("You are connected to database \"%s\" as user \"%s\" on host \"%s\" at port \"%s\".\n"), db, PQuser(pset.db), host, PQport(pset.db)); + printSSLInfo(); + } } } -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers