Skip to content

Commit

Permalink
Fix: Illegal PGnotify declaration
Browse files Browse the repository at this point in the history
Change the declaration `struct PGnotify` to `struct pgNotify`, which
will make compile error when third part extension include header
`cdbdispatchresult.h`.
  • Loading branch information
jiaqizho authored and avamingli committed Dec 8, 2023
1 parent d39ed5c commit 9ef1938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/cdb/dispatcher/cdbdisp_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/include/cdb/cdbdispatchresult.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;

/*
Expand Down

0 comments on commit 9ef1938

Please sign in to comment.