From 785db40fe5959a37eae7da96cf5c69d82a339514 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Tue, 10 Feb 2026 10:52:47 +0100 Subject: [PATCH 1/2] Remove version from README.md This was just another thing to remember, which we apparently forgot for 0.2.0 and 0.3.0, which does not add enough value. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f65855..fb206d4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pg\_oidc\_validator 0.1.0 +# pg_oidc_validator OAuth validator library for PostgreSQL 18 From e9d7236eb3c4b51166fa02771bf34394b55afd0b Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Tue, 10 Feb 2026 18:34:49 +0100 Subject: [PATCH 2/2] Allow people to see version of module when loaded Use the PG_MODULE_MAGIC_EXT to add metadata to the module. When the OAuth validator is loaded people can see which version of the library was used the pg_get_loaded_modules() function. --- src/pg_oidc_validator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pg_oidc_validator.cpp b/src/pg_oidc_validator.cpp index e56fec0..4648b57 100644 --- a/src/pg_oidc_validator.cpp +++ b/src/pg_oidc_validator.cpp @@ -7,6 +7,9 @@ #include "http_client.hpp" #include "jwk.hpp" +static const char* ModuleName = "pg_oidc_validator"; +static const char* ModuleVersion = "1.0.0"; + extern "C" { #include "postgres.h" // @@ -16,7 +19,7 @@ extern "C" { #include "miscadmin.h" #include "utils/guc.h" -PG_MODULE_MAGIC; +PG_MODULE_MAGIC_EXT(.name = ModuleName, .version = ModuleVersion); } bool validate_token(const ValidatorModuleState* state, const char* token, const char* role,