Skip to content

Commit 53a00b5

Browse files
nathan-bossartCommitfest Bot
authored andcommitted
Use PqMsg_* macros in fe-protocol3.c.
1 parent 878656d commit 53a00b5

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/include/libpq/protocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666

6767

6868
/* These are the codes sent by parallel workers to leader processes. */
69+
6970
#define PqMsg_Progress 'P'
7071

7172

src/interfaces/libpq/fe-protocol3.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
22622262
*/
22632263
switch (id)
22642264
{
2265-
case 'V': /* function result */
2265+
case PqMsg_FunctionCallResponse:
22662266
if (pqGetInt(actual_result_len, 4, conn))
22672267
continue;
22682268
if (*actual_result_len != -1)
@@ -2283,22 +2283,22 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
22832283
/* correctly finished function result message */
22842284
status = PGRES_COMMAND_OK;
22852285
break;
2286-
case 'E': /* error return */
2286+
case PqMsg_ErrorResponse:
22872287
if (pqGetErrorNotice3(conn, true))
22882288
continue;
22892289
status = PGRES_FATAL_ERROR;
22902290
break;
2291-
case 'A': /* notify message */
2291+
case PqMsg_NotificationResponse:
22922292
/* handle notify and go back to processing return values */
22932293
if (getNotify(conn))
22942294
continue;
22952295
break;
2296-
case 'N': /* notice */
2296+
case PqMsg_NoticeResponse:
22972297
/* handle notice and go back to processing return values */
22982298
if (pqGetErrorNotice3(conn, false))
22992299
continue;
23002300
break;
2301-
case 'Z': /* backend is ready for new query */
2301+
case PqMsg_ReadyForQuery:
23022302
if (getReadyForQuery(conn))
23032303
continue;
23042304

@@ -2330,7 +2330,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
23302330
}
23312331
/* and we're out */
23322332
return pqPrepareAsyncResult(conn);
2333-
case 'S': /* parameter status */
2333+
case PqMsg_ParameterStatus:
23342334
if (getParameterStatus(conn))
23352335
continue;
23362336
break;

0 commit comments

Comments
 (0)