Re: \conninfo and SSL

Поиск
Список
Период
Сортировка
От Alastair Turner
Тема Re: \conninfo and SSL
Дата
Msg-id CAFgq2fWYH_QpE+Qgg9Xx+zzNXZx2Gx+x+sv76jVEgzPuVfao4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: \conninfo and SSL  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: \conninfo and SSL  (Robert Haas <robertmhaas@gmail.com>)
Re: \conninfo and SSL  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Thu, May 31, 2012 at 9:11 PM, Magnus Hagander <magnus@hagander.net> wrote:
> On Thu, May 31, 2012 at 9:04 PM, Bruce Momjian <bruce@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();
+                       }               }       }


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Brar Piening
Дата:
Сообщение: Visual Studio 2012 RC
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Visual Studio 2012 RC