From 55527368bd07248e91e3d37a782bf66b76f06865 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 26 Mar 2025 11:11:02 -0400 Subject: 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 Discussion: https://postgr.es/m/dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com --- contrib/postgres_fdw/postgres_fdw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib/postgres_fdw/postgres_fdw.c') diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 7a5439a460b..ac14c06c715 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -49,7 +49,10 @@ #include "utils/sampling.h" #include "utils/selfuncs.h" -PG_MODULE_MAGIC; +PG_MODULE_MAGIC_EXT( + .name = "postgres_fdw", + .version = PG_VERSION +); /* Default CPU cost to start up a foreign query. */ #define DEFAULT_FDW_STARTUP_COST 100.0 -- cgit v1.2.3