mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Fix pg_stat_ssl.clientdn
Return null if there is no client certificate. This is how it has always been documented, but in reality it returned an empty string. Reviewed-by: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> Discussion: https://www.postgresql.org/message-id/flat/398754d8-6bb5-c5cf-e7b8-22e5f0983caf@2ndquadrant.com/
This commit is contained in:
@ -652,7 +652,10 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
values[20] = CStringGetTextDatum(beentry->st_sslstatus->ssl_cipher);
|
||||
values[21] = Int32GetDatum(beentry->st_sslstatus->ssl_bits);
|
||||
values[22] = BoolGetDatum(beentry->st_sslstatus->ssl_compression);
|
||||
values[23] = CStringGetTextDatum(beentry->st_sslstatus->ssl_clientdn);
|
||||
if (beentry->st_sslstatus->ssl_clientdn[0])
|
||||
values[23] = CStringGetTextDatum(beentry->st_sslstatus->ssl_clientdn);
|
||||
else
|
||||
nulls[23] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user