From 8a1355f14d2bddaff679297a5612414a53ad73da Mon Sep 17 00:00:00 2001 From: zhoujiaqi Date: Thu, 7 Dec 2023 16:59:25 +0800 Subject: [PATCH] Fix: Illegal PGnotify declaration Change the declaration `struct PGnotify` to `struct pgNotify`, which will make compile error when third part extension include header `cdbdispatchresult.h`. --- src/backend/cdb/dispatcher/cdbdisp_async.c | 2 +- src/include/cdb/cdbdispatchresult.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/cdb/dispatcher/cdbdisp_async.c b/src/backend/cdb/dispatcher/cdbdisp_async.c index 599e49e86ca..847410a46e1 100644 --- a/src/backend/cdb/dispatcher/cdbdisp_async.c +++ b/src/backend/cdb/dispatcher/cdbdisp_async.c @@ -1195,7 +1195,7 @@ processResults(CdbDispatchResult *dispatchResult) else if (strcmp(qnotifies->relname, CDB_NOTIFY_ENDPOINT_ACK) == 0) { qnotifies->next = (struct pgNotify *) dispatchResult->ackPGNotifies; - dispatchResult->ackPGNotifies = (struct PGnotify *) qnotifies; + dispatchResult->ackPGNotifies = qnotifies; /* Don't free the notify here since it in queue now */ qnotifies = NULL; diff --git a/src/include/cdb/cdbdispatchresult.h b/src/include/cdb/cdbdispatchresult.h index c67bb1b0705..d719df3e6f5 100644 --- a/src/include/cdb/cdbdispatchresult.h +++ b/src/include/cdb/cdbdispatchresult.h @@ -24,7 +24,7 @@ struct pg_result; /* PGresult ... #include "libpq-fe.h" */ struct SegmentDatabaseDescriptor; /* #include "cdb/cdbconn.h" */ struct StringInfoData; /* #include "lib/stringinfo.h" */ struct PQExpBufferData; /* #include "libpq-int.h" */ -struct PGnotify; /* PGnotify ... #include "libpq-fe.h" */ +struct pgNotify; /* PGnotify ... #include "libpq-fe.h" */ typedef struct CdbPgResults { @@ -123,7 +123,7 @@ typedef struct CdbDispatchResult * queue for acknowledge NOTIFY messages, get freed for * each cdbdisp_waitDispatchAckMessage call */ - struct PGnotify *ackPGNotifies; + struct pgNotify *ackPGNotifies; } CdbDispatchResult; /*