Skip to content

Commit 6ac5600

Browse files
committed
libpq: Some message style normalization
1 parent 99b9928 commit 6ac5600

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/interfaces/libpq/fe-cancel.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ PQcancelCreate(PGconn *conn)
7373
/* Check we have an open connection */
7474
if (!conn)
7575
{
76-
libpq_append_conn_error(cancelConn, "passed connection was NULL");
76+
libpq_append_conn_error(cancelConn, "connection pointer is NULL");
7777
return (PGcancelConn *) cancelConn;
7878
}
7979

8080
if (conn->sock == PGINVALID_SOCKET)
8181
{
82-
libpq_append_conn_error(cancelConn, "passed connection is not open");
82+
libpq_append_conn_error(cancelConn, "connection not open");
8383
return (PGcancelConn *) cancelConn;
8484
}
8585

@@ -260,7 +260,7 @@ PQcancelPoll(PGcancelConn *cancelConn)
260260
*/
261261
if (n > 0)
262262
{
263-
libpq_append_conn_error(conn, "received unexpected response from server");
263+
libpq_append_conn_error(conn, "unexpected response from server");
264264
conn->status = CONNECTION_BAD;
265265
return PGRES_POLLING_FAILED;
266266
}

src/interfaces/libpq/fe-connect.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1602,8 +1602,8 @@ pqConnectOptions2(PGconn *conn)
16021602
if (conn->sslnegotiation[0] != 'p')
16031603
{
16041604
conn->status = CONNECTION_BAD;
1605-
libpq_append_conn_error(conn, "sslnegotiation value \"%s\" invalid when SSL support is not compiled in",
1606-
conn->sslnegotiation);
1605+
libpq_append_conn_error(conn, "%s value \"%s\" invalid when SSL support is not compiled in",
1606+
"sslnegotiation", conn->sslnegotiation);
16071607
return false;
16081608
}
16091609
#endif

src/interfaces/libpq/fe-exec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2627,7 +2627,7 @@ PQsendTypedCommand(PGconn *conn, char command, char type, const char *target)
26272627
}
26282628
else
26292629
{
2630-
libpq_append_conn_error(conn, "unknown command type provided");
2630+
libpq_append_conn_error(conn, "unrecognized message type \"%c\"", command);
26312631
goto sendFailed;
26322632
}
26332633

0 commit comments

Comments
 (0)