From 4a68d5008869afd819b03075d69bf102dd2f1bda Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Tue, 7 Jan 2025 15:34:19 -0600 Subject: [PATCH] Use PqMsg_* macros in postgres.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit f4b54e1ed9, which introduced macros for protocol characters, missed updating a couple of places in postgres.c. Author: Dave Cramer Reviewed-by: Fabrízio de Royes Mello Discussion: https://postgr.es/m/CADK3HHJUVBPoVOmFesPB-fN8_dYt%2BQELV2UB6jxOW2Z40qF-qw%40mail.gmail.com Backpatch-through: 17 --- src/backend/tcop/postgres.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index c01cff9d650..5655348a2e2 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -310,7 +310,7 @@ InteractiveBackend(StringInfo inBuf) printf("statement: %s\n", inBuf->data); fflush(stdout); - return 'Q'; + return PqMsg_Query; } /* @@ -4897,9 +4897,9 @@ PostgresMain(const char *dbname, const char *username) break; /* - * 'X' means that the frontend is closing down the socket. EOF - * means unexpected loss of frontend connection. Either way, - * perform normal shutdown. + * PqMsg_Terminate means that the frontend is closing down the + * socket. EOF means unexpected loss of frontend connection. + * Either way, perform normal shutdown. */ case EOF: