Thank you for the quick response! Attached the last minute - now or
never patch to change the function name.

In addition I perceived a small inconsistency with the naming of the
SGML id of PQsslAttribute. This is addressed in the second patch file.

--
Kind Regards,
Lars

From 5b7f116de237df5404938fcb3a722c071d0ee120 Mon Sep 17 00:00:00 2001
From: Lars Kanis <l...@greiz-reinsdorf.de>
Date: Sat, 7 Nov 2015 21:00:21 +0100
Subject: [PATCH] Lowercase pqsslAttribute in SGML-id for consistency.

---
 doc/src/sgml/libpq.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 0ee018e..fdb06c3 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1873,7 +1873,7 @@ int PQsslInUse(const PGconn *conn);
      </listitem>
     </varlistentry>
 
-    <varlistentry id="libpq-pqsslAttribute">
+    <varlistentry id="libpq-pqsslattribute">
      <term><function>PQsslAttribute</function><indexterm><primary>PQsslAttribute</></></term>
      <listitem>
       <para>
-- 
2.1.4

From 2d86b4d785bb5b53c779b79a8010e7d7f6cbb9b5 Mon Sep 17 00:00:00 2001
From: Lars Kanis <l...@greiz-reinsdorf.de>
Date: Sat, 7 Nov 2015 20:42:43 +0100
Subject: [PATCH] Rename PQsslAttributes() to PQsslAttributeNames().

The name PQsslAttributes suggested, the function would return
attribute values or key/value pairs, but it returns keys only.
PQsslAttributeNames makes more clear, what the function is about.
---
 doc/src/sgml/libpq.sgml                  | 6 +++---
 src/interfaces/libpq/exports.txt         | 2 +-
 src/interfaces/libpq/fe-secure-openssl.c | 2 +-
 src/interfaces/libpq/fe-secure.c         | 2 +-
 src/interfaces/libpq/libpq-fe.h          | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 0ee018e..7c31f42 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1947,13 +1947,13 @@ const char *PQsslAttribute(const PGconn *conn, const char *attribute_name);
      </listitem>
     </varlistentry>
 
-    <varlistentry id="libpq-pqsslattributes">
-     <term><function>PQsslAttributes</function><indexterm><primary>PQsslAttributes</></></term>
+    <varlistentry id="libpq-pqsslattributenames">
+     <term><function>PQsslAttributeNames</function><indexterm><primary>PQsslAttributeNames</></></term>
      <listitem>
       <para>
        Return an array of SSL attribute names available. The array is terminated by a NULL pointer.
 <synopsis>
-const char **PQsslAttributes(const PGconn *conn);
+const char **PQsslAttributeNames(const PGconn *conn);
 </synopsis>
       </para>
      </listitem>
diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt
index 0bbcae5..c69a4d5 100644
--- a/src/interfaces/libpq/exports.txt
+++ b/src/interfaces/libpq/exports.txt
@@ -167,6 +167,6 @@ lo_truncate64             164
 PQconninfo                165
 PQsslInUse                166
 PQsslStruct               167
-PQsslAttributes           168
+PQsslAttributeNames       168
 PQsslAttribute            169
 PQsetErrorContextVisibility 170
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 4b2a324..e88a7ee 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1533,7 +1533,7 @@ PQsslStruct(PGconn *conn, const char *struct_name)
 }
 
 const char **
-PQsslAttributes(PGconn *conn)
+PQsslAttributeNames(PGconn *conn)
 {
 	static const char *result[] = {
 		"library",
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index db91e52..ed1342e 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -409,7 +409,7 @@ PQsslAttribute(PGconn *conn, const char *attribute_name)
 }
 
 const char **
-PQsslAttributes(PGconn *conn)
+PQsslAttributeNames(PGconn *conn)
 {
 	static const char *result[] = {NULL};
 
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 828c533..eddb817 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -329,7 +329,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 **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. */
-- 
2.1.4

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to