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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy