summaryrefslogtreecommitdiff
path: root/contrib/spi
diff options
context:
space:
mode:
authorTom Lane2025-03-26 15:11:02 +0000
committerTom Lane2025-03-26 15:11:02 +0000
commit55527368bd07248e91e3d37a782bf66b76f06865 (patch)
tree7bb79a5fedea00a79c5b447b1539e3098f0fde42 /contrib/spi
parent9324c8c580655800331b0582b770e88c01b7a5c4 (diff)
Use PG_MODULE_MAGIC_EXT in our installable shared libraries.
It seems potentially useful to label our shared libraries with version information, now that a facility exists for retrieving that. This patch labels them with the PG_VERSION string. There was some discussion about using semantic versioning conventions, but that doesn't seem terribly helpful for modules with no SQL-level presence; and for those that do have SQL objects, we typically expect them to support multiple revisions of the SQL definitions, so it'd still not be very helpful. I did not label any of src/test/modules/. It seems unnecessary since we don't install those, and besides there ought to be someplace that still provides test coverage for the original PG_MODULE_MAGIC macro. Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com
Diffstat (limited to 'contrib/spi')
-rw-r--r--contrib/spi/autoinc.c5
-rw-r--r--contrib/spi/insert_username.c5
-rw-r--r--contrib/spi/moddatetime.c5
-rw-r--r--contrib/spi/refint.c5
4 files changed, 16 insertions, 4 deletions
diff --git a/contrib/spi/autoinc.c b/contrib/spi/autoinc.c
index 8bf742230e0..b5609f20251 100644
--- a/contrib/spi/autoinc.c
+++ b/contrib/spi/autoinc.c
@@ -11,7 +11,10 @@
#include "utils/builtins.h"
#include "utils/rel.h"
-PG_MODULE_MAGIC;
+PG_MODULE_MAGIC_EXT(
+ .name = "autoinc",
+ .version = PG_VERSION
+);
PG_FUNCTION_INFO_V1(autoinc);
diff --git a/contrib/spi/insert_username.c b/contrib/spi/insert_username.c
index a2e1747ff74..e44241f9d6c 100644
--- a/contrib/spi/insert_username.c
+++ b/contrib/spi/insert_username.c
@@ -14,7 +14,10 @@
#include "utils/builtins.h"
#include "utils/rel.h"
-PG_MODULE_MAGIC;
+PG_MODULE_MAGIC_EXT(
+ .name = "insert_username",
+ .version = PG_VERSION
+);
PG_FUNCTION_INFO_V1(insert_username);
diff --git a/contrib/spi/moddatetime.c b/contrib/spi/moddatetime.c
index 5130804ce2a..5013eee433e 100644
--- a/contrib/spi/moddatetime.c
+++ b/contrib/spi/moddatetime.c
@@ -22,7 +22,10 @@ OH, me, I'm Terry Mackintosh <terry@terrym.com>
#include "utils/fmgrprotos.h"
#include "utils/rel.h"
-PG_MODULE_MAGIC;
+PG_MODULE_MAGIC_EXT(
+ .name = "moddatetime",
+ .version = PG_VERSION
+);
PG_FUNCTION_INFO_V1(moddatetime);
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index e1aef7cd2a3..d954f5c838f 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -15,7 +15,10 @@
#include "utils/memutils.h"
#include "utils/rel.h"
-PG_MODULE_MAGIC;
+PG_MODULE_MAGIC_EXT(
+ .name = "refint",
+ .version = PG_VERSION
+);
typedef struct
{