Skip to content

Commit

Permalink
Prevent building against pg versions with broken ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
svenklemm committed Nov 26, 2024
1 parent a38332a commit 3215320
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .unreleased/pr_7486
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implements: #7486 Prevent building against postgres versions with broken ABI
17 changes: 13 additions & 4 deletions src/compat/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@

#define PG_MAJOR_MIN 14

#define is_supported_pg_version_14(version) ((version >= 140000) && (version < 150000))
#define is_supported_pg_version_15(version) ((version >= 150000) && (version < 160000))
#define is_supported_pg_version_16(version) ((version >= 160000) && (version < 170000))
#define is_supported_pg_version_17(version) ((version >= 170000) && (version < 180000))
/*
* Prevent building against upstream versions that had ABI breaking change (14.14, 15.9, 16.5, 17.1)
* that was reverted in the following release.
*/

#define is_supported_pg_version_14(version) \
((version >= 140000) && (version < 150000) && (version != 140014))
#define is_supported_pg_version_15(version) \
((version >= 150000) && (version < 160000) && (version != 150009))
#define is_supported_pg_version_16(version) \
((version >= 160000) && (version < 170000) && (version != 160005))
#define is_supported_pg_version_17(version) \
((version >= 170000) && (version < 180000) && (version != 170001))

/*
* PG16 support is a WIP and not complete yet.
Expand Down

0 comments on commit 3215320

Please sign in to comment.