From f4051e363c1757a5fa05825a361d9dd0e54508bc Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 16 Mar 2014 21:43:40 -0400 Subject: [PATCH] Fix advertised dispsize for libpq's sslmode connection parameter. "8" was correct back when "disable" was the longest allowed value, but since "verify-full" was added, it should be "12". Given the lack of complaints, I wouldn't be surprised if nobody is actually using these values ... but still, if they're in the API, they should be right. Noticed while pursuing a different problem. It's been wrong for quite a long time, so back-patch to all supported branches. --- src/interfaces/libpq/fe-connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index dedb6e74f1..da8335e680 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -251,7 +251,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { * to exclude them since none of them are mandatory. */ {"sslmode", "PGSSLMODE", DefaultSSLMode, NULL, - "SSL-Mode", "", 8, /* sizeof("disable") == 8 */ + "SSL-Mode", "", 12, /* sizeof("verify-full") == 12 */ offsetof(struct pg_conn, sslmode)}, {"sslcompression", "PGSSLCOMPRESSION", "1", NULL,