postgresql/src/backend/libpq
Tom Lane 26fa446da6 Add a nonlocalized version of the severity field to client error messages.
This has been requested a few times, but the use-case for it was never
entirely clear.  The reason for adding it now is that transmission of
error reports from parallel workers fails when NLS is active, because
pq_parse_errornotice() wrongly assumes that the existing severity field
is nonlocalized.  There are other ways we could have fixed that, but the
other options were basically kluges, whereas this way provides something
that's at least arguably a useful feature along with the bug fix.

Per report from Jakob Egger.  Back-patch into 9.6, because otherwise
parallel query is essentially unusable in non-English locales.  The
problem exists in 9.5 as well, but we don't want to risk changing
on-the-wire behavior in 9.5 (even though the possibility of new error
fields is specifically called out in the protocol document).  It may
be sufficient to leave the issue unfixed in 9.5, given the very limited
usefulness of pq_parse_errornotice in that version.

Discussion: <A88E0006-13CB-49C6-95CC-1A77D717213C@eggerapps.at>
2016-08-26 16:20:17 -04:00
..
Makefile Support frontend-backend protocol communication using a shm_mq. 2014-10-31 12:02:40 -04:00
README.SSL Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
auth.c Refactor sendAuthRequest. 2016-08-18 13:25:31 +03:00
be-fsstubs.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
be-secure-openssl.c pgindent run for 9.6 2016-06-09 18:02:36 -04:00
be-secure.c pgindent run for 9.6 2016-06-09 18:02:36 -04:00
crypt.c Remove vestigial CHECK_FOR_INTERRUPTS call. 2016-01-07 11:26:54 -05:00
hba.c Add authentication parameters compat_realm and upn_usename for SSPI 2016-04-08 20:28:38 +02:00
ip.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
md5.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_hba.conf.sample Remove support for native krb5 authentication 2014-01-19 17:05:01 +01:00
pg_ident.conf.sample Reformat the comments in pg_hba.conf and pg_ident.conf 2010-01-26 06:58:39 +00:00
pqcomm.c Remove duplicate function prototype. 2016-08-23 13:44:18 -04:00
pqformat.c Fix several mistakes around parallel workers and client_encoding. 2016-06-30 18:35:32 -04:00
pqmq.c Add a nonlocalized version of the severity field to client error messages. 2016-08-26 16:20:17 -04:00
pqsignal.c Update copyright for 2016 2016-01-02 13:33:40 -05:00

README.SSL

src/backend/libpq/README.SSL

SSL
===

>From the servers perspective:


  Receives StartupPacket
           |
           |
 (Is SSL_NEGOTIATE_CODE?) -----------  Normal startup
           |                  No
           |
           | Yes
           |
           |
 (Server compiled with USE_SSL?) ------- Send 'N'
           |                       No        |
           |                                 |
           | Yes                         Normal startup
           |
           |
        Send 'S'
           |
           |
      Establish SSL
           |
           |
      Normal startup





>From the clients perspective (v6.6 client _with_ SSL):


      Connect
         |
         |
  Send packet with SSL_NEGOTIATE_CODE
         |
         |
  Receive single char  ------- 'S' -------- Establish SSL
         |                                       |
         | '<else>'                              |
         |                                  Normal startup
         |
         |
   Is it 'E' for error  ------------------- Retry connection
         |                  Yes             without SSL
         | No
         |
   Is it 'N' for normal ------------------- Normal startup
         |                  Yes
         |
   Fail with unknown

---------------------------------------------------------------------------