mirror of https://github.com/postgres/postgres
Add pg_tde_version() function to get the module version of the extension (#158)
* Add pg_tde_version function to get the module version of the extension To make the version number configurable, the configure script outputs the PACKAGE VERSION to the config.h file that gets returned by the SQL interface. To bump the version, you need to update the version number passed to the AC_INIT macro in configure.ac and pg_tde_version define in meson.build filepull/209/head
parent
9c9f6e077b
commit
5cf6ad8abd
@ -0,0 +1,57 @@ |
||||
/* src/include/config.h.in. Generated from configure.ac by autoheader. */ |
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */ |
||||
#undef HAVE_INTTYPES_H |
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */ |
||||
#undef HAVE_LIBCURL |
||||
|
||||
/* Define to 1 if you have the `intl' library (-lintl). */ |
||||
#undef HAVE_LIBINTL |
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */ |
||||
#undef HAVE_STDINT_H |
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */ |
||||
#undef HAVE_STDIO_H |
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */ |
||||
#undef HAVE_STDLIB_H |
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */ |
||||
#undef HAVE_STRINGS_H |
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */ |
||||
#undef HAVE_STRING_H |
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
||||
#undef HAVE_SYS_STAT_H |
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */ |
||||
#undef HAVE_SYS_TYPES_H |
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */ |
||||
#undef HAVE_UNISTD_H |
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */ |
||||
#undef PACKAGE_BUGREPORT |
||||
|
||||
/* Define to the full name of this package. */ |
||||
#undef PACKAGE_NAME |
||||
|
||||
/* Define to the full name and version of this package. */ |
||||
#undef PACKAGE_STRING |
||||
|
||||
/* Define to the one symbol short name of this package. */ |
||||
#undef PACKAGE_TARNAME |
||||
|
||||
/* Define to the home page for this package. */ |
||||
#undef PACKAGE_URL |
||||
|
||||
/* Define to the version of this package. */ |
||||
#undef PACKAGE_VERSION |
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for |
||||
backward compatibility; new code need not use it. */ |
||||
#undef STDC_HEADERS |
@ -0,0 +1,16 @@ |
||||
/*-------------------------------------------------------------------------
|
||||
* |
||||
* pg_tde_defs.h |
||||
* src/include/pg_tde_defs.h |
||||
* |
||||
*------------------------------------------------------------------------- |
||||
*/ |
||||
#ifndef PG_TDE_DEFS_H |
||||
#define PG_TDE_DEFS_H |
||||
|
||||
|
||||
extern const char *pg_tde_package_string(void); |
||||
extern const char *pg_tde_package_name(void); |
||||
extern const char *pg_tde_package_version(void); |
||||
|
||||
#endif /*PG_TDE_DEFS_H*/ |
@ -0,0 +1,36 @@ |
||||
/*-------------------------------------------------------------------------
|
||||
* |
||||
* pg_tde_defs.c |
||||
* The configure script generates config.h which contains the package_* defs |
||||
* and these defines conflicts with the PG defines. |
||||
* This file is used to provide the package version string to the extension |
||||
* without including the config.h file. |
||||
* |
||||
* IDENTIFICATION |
||||
* contrib/pg_tde/src/pg_tde_defs.c |
||||
* |
||||
*------------------------------------------------------------------------- |
||||
*/ |
||||
|
||||
|
||||
#include "config.h" |
||||
#include "pg_tde_defs.h" |
||||
|
||||
|
||||
/* Returns package version */ |
||||
const char* |
||||
pg_tde_package_string(void) |
||||
{ |
||||
return PACKAGE_STRING; |
||||
} |
||||
|
||||
const char * |
||||
pg_tde_package_name(void) |
||||
{ |
||||
return PACKAGE_NAME; |
||||
} |
||||
const char* |
||||
pg_tde_package_version(void) |
||||
{ |
||||
return PACKAGE_VERSION; |
||||
} |
Loading…
Reference in new issue