-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add compatibility header and switch to ProcNumber
A change was introduced by https://www.postgresql.org/message-id/[email protected] renaming BackendId to ProcNumber. Switch to ProcNumber and maintain a translation macro for backward compatibility.
- Loading branch information
Showing
3 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/*------------------------------------------------------------------------- | ||
* | ||
* src/version_compat.h | ||
* Compatibility macros for writing code agnostic to PostgreSQL versions | ||
* | ||
*------------------------------------------------------------------------- | ||
*/ | ||
|
||
#ifndef VERSION_COMPAT_H | ||
#define VERSION_COMPAT_H | ||
|
||
#include "postgres.h" | ||
|
||
#if PG_VERSION_NUM < 170000 | ||
|
||
/* | ||
* Compatibility with changes introduced in | ||
* https://www.postgresql.org/message-id/[email protected] | ||
*/ | ||
|
||
#define INVALID_PROC_NUMBER InvalidBackendId | ||
#define MyProcNumber MyBackendId | ||
#define ProcNumber BackendId | ||
#define ParallelLeaderProcNumber ParallelLeaderBackendId | ||
|
||
#endif | ||
|
||
#endif /* VERSION_COMPAT_H */ |