libpq with ssl vs psql without

Started by Magnus Haganderover 17 years ago3 messageshackers
Jump to latest
#1Magnus Hagander
magnus@hagander.net

I just noticed that if you have libpq with SSL support, but psql
without, we don't print any SSL information at all. Would it be
worthwhile to have it print that SSL is in use, even if we can't print
the details about the connection?

It's not something that's very common outside development scenarios, but
it would be trivial to implement. And the net would probably be a
code-win, since we could remove a number of #ifdef USE_SSL and replace
them with one - see attached (untested so may have typos) patch.

//Magnus

Attachments:

psql_ssl.patchtext/x-diff; name=psql_ssl.patchDownload+5-6
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)
Re: libpq with ssl vs psql without

Magnus Hagander <magnus@hagander.net> writes:

I just noticed that if you have libpq with SSL support, but psql
without, we don't print any SSL information at all. Would it be
worthwhile to have it print that SSL is in use, even if we can't print
the details about the connection?

I think the use-case for this is nonexistent, but you can still sell the
change on the grounds of reducing the number of #ifdefs.

It might be worth putting a comment in there, because people will wonder
what the heck this is about.

/* this can only happen if libpq has SSL support and psql doesn't */

regards, tom lane

#3Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#2)
Re: libpq with ssl vs psql without

Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

I just noticed that if you have libpq with SSL support, but psql
without, we don't print any SSL information at all. Would it be
worthwhile to have it print that SSL is in use, even if we can't print
the details about the connection?

I think the use-case for this is nonexistent, but you can still sell the
change on the grounds of reducing the number of #ifdefs.

It might be worth putting a comment in there, because people will wonder
what the heck this is about.

/* this can only happen if libpq has SSL support and psql doesn't */

Done.

//Magnus