summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2025-08-25 11:08:26 -0500
committerNathan Bossart <nathan@postgresql.org>2025-08-25 11:08:26 -0500
commit3ef2b863a376af35e8d5f2cd1bb4311ec7a9f299 (patch)
treead240db8b67f2fc8a1880565fad55712c7332192 /src
parent878656dbde0d2fd4b85a8c63566e2a9f0d0f4952 (diff)
Use PqMsg_* macros in fe-protocol3.c.
Oversight in commit f4b54e1ed9. Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Reviewed-by: Fabrízio de Royes Mello <fabriziomello@gmail.com> Discussion: https://postgr.es/m/aKx5vEbbP03JNgtp%40nathan
Diffstat (limited to 'src')
-rw-r--r--src/include/libpq/protocol.h1
-rw-r--r--src/interfaces/libpq/fe-protocol3.c12
2 files changed, 7 insertions, 6 deletions
diff --git a/src/include/libpq/protocol.h b/src/include/libpq/protocol.h
index c64e628628d..7bf90053bcb 100644
--- a/src/include/libpq/protocol.h
+++ b/src/include/libpq/protocol.h
@@ -66,6 +66,7 @@
/* These are the codes sent by parallel workers to leader processes. */
+
#define PqMsg_Progress 'P'
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
index 43ad672abce..da7a8db68c8 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -2262,7 +2262,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
*/
switch (id)
{
- case 'V': /* function result */
+ case PqMsg_FunctionCallResponse:
if (pqGetInt(actual_result_len, 4, conn))
continue;
if (*actual_result_len != -1)
@@ -2283,22 +2283,22 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
/* correctly finished function result message */
status = PGRES_COMMAND_OK;
break;
- case 'E': /* error return */
+ case PqMsg_ErrorResponse:
if (pqGetErrorNotice3(conn, true))
continue;
status = PGRES_FATAL_ERROR;
break;
- case 'A': /* notify message */
+ case PqMsg_NotificationResponse:
/* handle notify and go back to processing return values */
if (getNotify(conn))
continue;
break;
- case 'N': /* notice */
+ case PqMsg_NoticeResponse:
/* handle notice and go back to processing return values */
if (pqGetErrorNotice3(conn, false))
continue;
break;
- case 'Z': /* backend is ready for new query */
+ case PqMsg_ReadyForQuery:
if (getReadyForQuery(conn))
continue;
@@ -2330,7 +2330,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
}
/* and we're out */
return pqPrepareAsyncResult(conn);
- case 'S': /* parameter status */
+ case PqMsg_ParameterStatus:
if (getParameterStatus(conn))
continue;
break;