Skip to content

Commit 5b63663

Browse files
authored
Merge pull request #3112 from jeltz/pg-module-magic-ext
Use PG_MODULE_MAGIC_EXT in PostgreSQL 18 and later
2 parents fdaabca + d4f894e commit 5b63663

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/dijkstra/dijkstra.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3737
#include "c_types/path_rt.h"
3838
#include "process/shortestPath_process.h"
3939

40-
PG_MODULE_MAGIC;
41-
4240
PGDLLEXPORT Datum _pgr_dijkstra_v4(PG_FUNCTION_ARGS);
4341
PG_FUNCTION_INFO_V1(_pgr_dijkstra_v4);
4442

src/version/version.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2929
#include "c_common/postgres_connection.h"
3030
#include "./version.h"
3131

32+
#ifdef PG_MODULE_MAGIC_EXT
33+
PG_MODULE_MAGIC_EXT(.name = "pgrouting", .version = PROJECT_VERSION);
34+
#else
35+
PG_MODULE_MAGIC;
36+
#endif
37+
3238
#define UNUSED(x) (void)(x)
3339

3440
PGDLLEXPORT Datum _pgr_boost_version(PG_FUNCTION_ARGS);

0 commit comments

Comments
 (0)