Rewrite error message related to sslmode in libpq
authorMichael Paquier <[email protected]>
Fri, 24 Mar 2023 01:14:33 +0000 (10:14 +0900)
committerMichael Paquier <[email protected]>
Fri, 24 Mar 2023 01:14:33 +0000 (10:14 +0900)
The same error message will be used for a different option, to be
introduced in a separate patch.  Reshaping the error message as done
here saves in translation.

Extracted from a larger patch by the same author.

Author: Jacob Champion
Discussion: https://postgr.es/m/9e5a8ccddb8355ea9fa4b75a1e3a9edc88a70cd3[email protected]

src/interfaces/libpq/fe-connect.c

index b9f899c552eef99421a654353d2a7fceeb7ccf80..7d2be5666485ce784a9def935a2e2d33d0b1e818 100644 (file)
@@ -1457,8 +1457,8 @@ connectOptions2(PGconn *conn)
            case 'r':           /* "require" */
            case 'v':           /* "verify-ca" or "verify-full" */
                conn->status = CONNECTION_BAD;
-               libpq_append_conn_error(conn, "sslmode value \"%s\" invalid when SSL support is not compiled in",
-                                       conn->sslmode);
+               libpq_append_conn_error(conn, "%s value \"%s\" invalid when SSL support is not compiled in",
+                                       "sslmode", conn->sslmode);
                return false;
        }
 #endif