mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
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
This commit is contained in:
@@ -66,6 +66,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* These are the codes sent by parallel workers to leader processes. */
|
/* These are the codes sent by parallel workers to leader processes. */
|
||||||
|
|
||||||
#define PqMsg_Progress 'P'
|
#define PqMsg_Progress 'P'
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2262,7 +2262,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
|
|||||||
*/
|
*/
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case 'V': /* function result */
|
case PqMsg_FunctionCallResponse:
|
||||||
if (pqGetInt(actual_result_len, 4, conn))
|
if (pqGetInt(actual_result_len, 4, conn))
|
||||||
continue;
|
continue;
|
||||||
if (*actual_result_len != -1)
|
if (*actual_result_len != -1)
|
||||||
@@ -2283,22 +2283,22 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
|
|||||||
/* correctly finished function result message */
|
/* correctly finished function result message */
|
||||||
status = PGRES_COMMAND_OK;
|
status = PGRES_COMMAND_OK;
|
||||||
break;
|
break;
|
||||||
case 'E': /* error return */
|
case PqMsg_ErrorResponse:
|
||||||
if (pqGetErrorNotice3(conn, true))
|
if (pqGetErrorNotice3(conn, true))
|
||||||
continue;
|
continue;
|
||||||
status = PGRES_FATAL_ERROR;
|
status = PGRES_FATAL_ERROR;
|
||||||
break;
|
break;
|
||||||
case 'A': /* notify message */
|
case PqMsg_NotificationResponse:
|
||||||
/* handle notify and go back to processing return values */
|
/* handle notify and go back to processing return values */
|
||||||
if (getNotify(conn))
|
if (getNotify(conn))
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'N': /* notice */
|
case PqMsg_NoticeResponse:
|
||||||
/* handle notice and go back to processing return values */
|
/* handle notice and go back to processing return values */
|
||||||
if (pqGetErrorNotice3(conn, false))
|
if (pqGetErrorNotice3(conn, false))
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 'Z': /* backend is ready for new query */
|
case PqMsg_ReadyForQuery:
|
||||||
if (getReadyForQuery(conn))
|
if (getReadyForQuery(conn))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -2330,7 +2330,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid,
|
|||||||
}
|
}
|
||||||
/* and we're out */
|
/* and we're out */
|
||||||
return pqPrepareAsyncResult(conn);
|
return pqPrepareAsyncResult(conn);
|
||||||
case 'S': /* parameter status */
|
case PqMsg_ParameterStatus:
|
||||||
if (getParameterStatus(conn))
|
if (getParameterStatus(conn))
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user