aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-11-07 16:13:49 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-11-07 16:13:49 -0500
commitab994cc00ec3e3700b2e62de9777d410fbb6ae84 (patch)
treef5acafb2ba95106982ee1984f486eddff68efd62 /src
parent44fc25153681f0d3814275926f3c626a3f283cc2 (diff)
downloadpostgresql-ab994cc00ec3e3700b2e62de9777d410fbb6ae84.tar.gz
postgresql-ab994cc00ec3e3700b2e62de9777d410fbb6ae84.zip
Rename PQsslAttributes() to PQsslAttributeNames(), and const-ify fully.
Per discussion, the original name was a bit misleading, and PQsslAttributeNames() seems more apropos. It's not quite too late to change this in 9.5, so let's change it while we can. Also, make sure that the pointer array is const, not only the pointed-to strings. Minor documentation wordsmithing while at it. Lars Kanis, slight adjustments by me
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/exports.txt2
-rw-r--r--src/interfaces/libpq/fe-secure-openssl.c6
-rw-r--r--src/interfaces/libpq/fe-secure.c6
-rw-r--r--src/interfaces/libpq/libpq-fe.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt
index 4a21bf1d2cf..33f80e63e5b 100644
--- a/src/interfaces/libpq/exports.txt
+++ b/src/interfaces/libpq/exports.txt
@@ -167,5 +167,5 @@ lo_truncate64 164
PQconninfo 165
PQsslInUse 166
PQsslStruct 167
-PQsslAttributes 168
+PQsslAttributeNames 168
PQsslAttribute 169
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 4b2a324634b..45ad7321bbe 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1532,10 +1532,10 @@ PQsslStruct(PGconn *conn, const char *struct_name)
return NULL;
}
-const char **
-PQsslAttributes(PGconn *conn)
+const char *const *
+PQsslAttributeNames(PGconn *conn)
{
- static const char *result[] = {
+ static const char *const result[] = {
"library",
"key_bits",
"cipher",
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index db91e52ee90..aa5af7340fe 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -408,10 +408,10 @@ PQsslAttribute(PGconn *conn, const char *attribute_name)
return NULL;
}
-const char **
-PQsslAttributes(PGconn *conn)
+const char *const *
+PQsslAttributeNames(PGconn *conn)
{
- static const char *result[] = {NULL};
+ static const char *const result[] = {NULL};
return result;
}
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index a73eae2087a..bcd14ac1326 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -322,7 +322,7 @@ extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
extern int PQsslInUse(PGconn *conn);
extern void *PQsslStruct(PGconn *conn, const char *struct_name);
extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
-extern const char **PQsslAttributes(PGconn *conn);
+extern const char *const * PQsslAttributeNames(PGconn *conn);
/* Get the OpenSSL structure associated with a connection. Returns NULL for
* unencrypted connections or if any other TLS library is in use. */