You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-06-25 00:16:54 +02:00
Refactor PostgreSQL interface to remove most code duplication.
Having a copy per version worked well until it was time to add new features or modify existing functions. Then it was necessary to modify every version and try to keep them all in sync. Consolidate all the PostgreSQL types into a single file using #if for type versions. Many types do not change or change infrequently so this cuts down on duplication. In addition, it is far easier to see what has changed when a new version is added. Use macros to write the interface functions. There is still duplication here since some changes require a new copy of the macro, but it is far less than before.
This commit is contained in:
@ -24,6 +24,8 @@ PostgreSQL version constants
|
||||
#define PG_VERSION_10 100000
|
||||
#define PG_VERSION_11 110000
|
||||
|
||||
#define PG_VERSION_MAX PG_VERSION_11
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL version string constants for use in error messages
|
||||
***********************************************************************************************************************************/
|
||||
|
Reference in New Issue
Block a user