1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02:00

Autogenerate PostgreSQL versions.

This will make adding/removing versions of PostgreSQL more reliable.
This commit is contained in:
David Steele
2023-04-16 17:41:27 +03:00
parent a05bf6bb15
commit 8240eb5da5
7 changed files with 165 additions and 31 deletions

View File

@ -0,0 +1,39 @@
/***********************************************************************************************************************************
PostgreSQL Version
Automatically generated by 'build-code postgres-version' -- do not modify directly.
***********************************************************************************************************************************/
#ifndef POSTGRES_VERSION_AUTO_H
#define POSTGRES_VERSION_AUTO_H
/***********************************************************************************************************************************
PostgreSQL version constants
***********************************************************************************************************************************/
#define PG_VERSION_93 90300
#define PG_VERSION_94 90400
#define PG_VERSION_95 90500
#define PG_VERSION_96 90600
#define PG_VERSION_10 100000
#define PG_VERSION_11 110000
#define PG_VERSION_12 120000
#define PG_VERSION_13 130000
#define PG_VERSION_14 140000
#define PG_VERSION_15 150000
#define PG_VERSION_MAX PG_VERSION_15
/***********************************************************************************************************************************
PostgreSQL version string constants for use in error messages
***********************************************************************************************************************************/
#define PG_VERSION_93_Z "9.3"
#define PG_VERSION_94_Z "9.4"
#define PG_VERSION_95_Z "9.5"
#define PG_VERSION_96_Z "9.6"
#define PG_VERSION_10_Z "10"
#define PG_VERSION_11_Z "11"
#define PG_VERSION_12_Z "12"
#define PG_VERSION_13_Z "13"
#define PG_VERSION_14_Z "14"
#define PG_VERSION_15_Z "15"
#endif

View File

@ -4,27 +4,13 @@ PostgreSQL Version Constants
#ifndef POSTGRES_VERSION_H
#define POSTGRES_VERSION_H
#include "postgres/version.auto.h"
/***********************************************************************************************************************************
PostgreSQL name
***********************************************************************************************************************************/
#define PG_NAME "PostgreSQL"
/***********************************************************************************************************************************
PostgreSQL version constants
***********************************************************************************************************************************/
#define PG_VERSION_93 90300
#define PG_VERSION_94 90400
#define PG_VERSION_95 90500
#define PG_VERSION_96 90600
#define PG_VERSION_10 100000
#define PG_VERSION_11 110000
#define PG_VERSION_12 120000
#define PG_VERSION_13 130000
#define PG_VERSION_14 140000
#define PG_VERSION_15 150000
#define PG_VERSION_MAX PG_VERSION_15
/***********************************************************************************************************************************
Version where various PostgreSQL capabilities were introduced
***********************************************************************************************************************************/
@ -43,18 +29,4 @@ Version where various PostgreSQL capabilities were introduced
// recovery settings are implemented as GUCs (recovery.conf is no longer valid)
#define PG_VERSION_RECOVERY_GUC PG_VERSION_12
/***********************************************************************************************************************************
PostgreSQL version string constants for use in error messages
***********************************************************************************************************************************/
#define PG_VERSION_93_Z "9.3"
#define PG_VERSION_94_Z "9.4"
#define PG_VERSION_95_Z "9.5"
#define PG_VERSION_96_Z "9.6"
#define PG_VERSION_10_Z "10"
#define PG_VERSION_11_Z "11"
#define PG_VERSION_12_Z "12"
#define PG_VERSION_13_Z "13"
#define PG_VERSION_14_Z "14"
#define PG_VERSION_15_Z "15"
#endif