diff --git a/META.json b/META.json index cbcfaff..d6398ff 100644 --- a/META.json +++ b/META.json @@ -2,7 +2,7 @@ "name": "pgsodium", "abstract": "Postgres extension for libsodium functions", "description": "pgsodium is a PostgreSQL extension that exposes modern libsodium based cryptographic functions to SQL.", - "version": "3.1.2", + "version": "3.1.3", "maintainer": [ "Michel Pelletier " ], @@ -13,7 +13,7 @@ "abstract": "Postgres extension for libsodium functions", "file": "src/pgsodium.h", "docfile": "README.md", - "version": "3.1.2" + "version": "3.1.3" } }, "prereqs": { diff --git a/pgsodium.control b/pgsodium.control index 3b47165..574a3c9 100644 --- a/pgsodium.control +++ b/pgsodium.control @@ -1,5 +1,5 @@ # pgsodium extension comment = 'Postgres extension for libsodium functions' -default_version = '3.1.2' +default_version = '3.1.3' relocatable = false schema = pgsodium diff --git a/sql/pgsodium--3.1.2--3.1.3.sql b/sql/pgsodium--3.1.2--3.1.3.sql new file mode 100644 index 0000000..b1e0cfc --- /dev/null +++ b/sql/pgsodium--3.1.2--3.1.3.sql @@ -0,0 +1,18 @@ + +CREATE OR REPLACE FUNCTION pgsodium.trg_mask_update() +RETURNS EVENT_TRIGGER AS +$$ +DECLARE + r record; +BEGIN + IF (select bool_or(in_extension) FROM pg_event_trigger_ddl_commands()) THEN + RAISE NOTICE 'skipping pgsodium mask regeneration in extension'; + RETURN; + END IF; + PERFORM @extschema@.update_masks(); +END +$$ + LANGUAGE plpgsql + SET search_path='' +; +