diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 48689a7df23eca81e37b6da05da45f85e3614585..0fcf3130645859ae7774f31420c4fc4c8f73dddd 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -98,7 +98,9 @@
Makes a new connection to the database server.
-PGconn *PQconnectdbParams(const char **keywords, const char **values, int expand_dbname);
+PGconn *PQconnectdbParams(const char * const *keywords,
+ const char * const *values,
+ int expand_dbname);
@@ -730,8 +732,8 @@ PGconn *PQsetdb(char *pghost,
Make a connection to the database server in a nonblocking manner.
-PGconn *PQconnectStartParams(const char **keywords,
- const char **values,
+PGconn *PQconnectStartParams(const char * const *keywords,
+ const char * const *values,
int expand_dbname);
PGconn *PQconnectStart(const char *conninfo);
@@ -1112,7 +1114,9 @@ PostgresPollingStatusType PQresetPoll(PGconn *conn);
values to obtain the server status.
-PGPing PQpingParams(const char **keywords, const char **values, int expand_dbname);
+PGPing PQpingParams(const char * const *keywords,
+ const char * const *values,
+ int expand_dbname);
The function returns one of the following values:
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 6803649075f45828820b2e877e42c52828f3fa68..64eeebacfee80506d64513f2000de3a8b050e1ae 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -291,8 +291,8 @@ static void freePGconn(PGconn *conn);
static void closePGconn(PGconn *conn);
static PQconninfoOption *conninfo_parse(const char *conninfo,
PQExpBuffer errorMessage, bool use_defaults);
-static PQconninfoOption *conninfo_array_parse(const char **keywords,
- const char **values, PQExpBuffer errorMessage,
+static PQconninfoOption *conninfo_array_parse(const char *const * keywords,
+ const char *const * values, PQExpBuffer errorMessage,
bool use_defaults, int expand_dbname);
static char *conninfo_getval(PQconninfoOption *connOptions,
const char *keyword);
@@ -362,8 +362,8 @@ pgthreadlock_t pg_g_threadlock = default_threadlock;
* call succeeded.
*/
PGconn *
-PQconnectdbParams(const char **keywords,
- const char **values,
+PQconnectdbParams(const char *const * keywords,
+ const char *const * values,
int expand_dbname)
{
PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
@@ -381,8 +381,8 @@ PQconnectdbParams(const char **keywords,
* check server status, accepting parameters identical to PQconnectdbParams
*/
PGPing
-PQpingParams(const char **keywords,
- const char **values,
+PQpingParams(const char *const * keywords,
+ const char *const * values,
int expand_dbname)
{
PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
@@ -464,8 +464,8 @@ PQping(const char *conninfo)
* See PQconnectPoll for more info.
*/
PGconn *
-PQconnectStartParams(const char **keywords,
- const char **values,
+PQconnectStartParams(const char *const * keywords,
+ const char *const * values,
int expand_dbname)
{
PGconn *conn;
@@ -4249,7 +4249,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage,
* keywords will take precedence, however.
*/
static PQconninfoOption *
-conninfo_array_parse(const char **keywords, const char **values,
+conninfo_array_parse(const char *const * keywords, const char *const * values,
PQExpBuffer errorMessage, bool use_defaults,
int expand_dbname)
{
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index d7802753ef44066a1ee99138db56e8eb658bbaef..d13a5b94ab6b858839d8b90ddb4f676860183e44 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -235,14 +235,14 @@ typedef struct pgresAttDesc
/* make a new client connection to the backend */
/* Asynchronous (non-blocking) */
extern PGconn *PQconnectStart(const char *conninfo);
-extern PGconn *PQconnectStartParams(const char **keywords,
- const char **values, int expand_dbname);
+extern PGconn *PQconnectStartParams(const char *const * keywords,
+ const char *const * values, int expand_dbname);
extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
/* Synchronous (blocking) */
extern PGconn *PQconnectdb(const char *conninfo);
-extern PGconn *PQconnectdbParams(const char **keywords,
- const char **values, int expand_dbname);
+extern PGconn *PQconnectdbParams(const char *const * keywords,
+ const char *const * values, int expand_dbname);
extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
const char *pgoptions, const char *pgtty,
const char *dbName,
@@ -413,8 +413,8 @@ extern int PQsetnonblocking(PGconn *conn, int arg);
extern int PQisnonblocking(const PGconn *conn);
extern int PQisthreadsafe(void);
extern PGPing PQping(const char *conninfo);
-extern PGPing PQpingParams(const char **keywords,
- const char **values, int expand_dbname);
+extern PGPing PQpingParams(const char *const * keywords,
+ const char *const * values, int expand_dbname);
/* Force the write buffer to be written (or at least try) */
extern int PQflush(PGconn *conn);