From 2eca2d1a1d6a5bd46e425b2e6aad14e0ae83e59a Mon Sep 17 00:00:00 2001 From: Chris Travers Date: Tue, 14 Nov 2017 16:09:41 +0100 Subject: [PATCH] Parallelism for 9.6 (#8) Changelog added PGXN files bumped for release Parallelism added for 9.6 md5 hash function added that are consistent with casting conventions --- .travis.yml | 10 +- Changelog | 4 + Changes | 8 ++ META.json | 14 +-- Makefile | 2 +- README.hashtypes | 4 + hashtypes.control | 2 +- sql/crc32.sql | 20 ++++ sql/hashtypes--0.1.3--0.1.4.sql | 158 ++++++++++++++++++++++++++++++++ sql/md5.sql | 29 ++++++ sql/sha.sql.type | 23 +++++ 11 files changed, 263 insertions(+), 11 deletions(-) create mode 100644 Changelog create mode 100644 Changes create mode 100644 sql/hashtypes--0.1.3--0.1.4.sql diff --git a/.travis.yml b/.travis.yml index 6035266..12e831a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,16 +11,22 @@ matrix: install: - sudo apt-get install postgresql-server-dev-9.4 - sudo make install + env: + - PostgreSQL=9.4 - addons: postgresql: 9.5 install: - sudo apt-get install postgresql-server-dev-9.5 - sudo make install + env: + - PostgreSQL=9.5 - addons: postgresql: 9.6 install: - sudo apt-get install postgresql-server-dev-9.6 - sudo make install + env: + - PostgreSQL=9.6 - # addons: postgresql: 10 install: - wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add - @@ -32,9 +38,9 @@ matrix: - sudo pg_ctlcluster 10 main restart - sudo -u postgres psql -c "create user travis with superuser"; - sudo make install + env: + - PostgreSQL=10 -env: - - COVERAGE=1 RELEASE_TESTING=1 DB_TESTING=1 script: - make installcheck after_failure: diff --git a/Changelog b/Changelog new file mode 100644 index 0000000..d02718b --- /dev/null +++ b/Changelog @@ -0,0 +1,4 @@ +Changes since 0.1.1: + + 1. Join operations now provide correct estimates + 2. Functions correctly marked immutable when immutable diff --git a/Changes b/Changes new file mode 100644 index 0000000..6ecb62a --- /dev/null +++ b/Changes @@ -0,0 +1,8 @@ +0.1.4 2017-11-16 + Parallelism for 9.6 and higher + Adding text(md5hash) and bytea(md5hash) functions for consistency + +0.1.3 2017-11-14 + First release after handover + Immutability fixes + Join operation estimate fixes diff --git a/META.json b/META.json index d06233c..1367185 100644 --- a/META.json +++ b/META.json @@ -1,8 +1,8 @@ { "name": "hashtypes", "abstract": "data types for sha{1,256,512}, md5 and crc32", - "version": "0.1.1", - "maintainer": "Andrey Popp <8mayday@gmail.com>", + "version": "0.1.4", + "maintainer": ["Chris Travers ", "Manuel Kniep "], "license": "postgresql", "meta-spec": { "version": "1.0.0", @@ -10,17 +10,17 @@ }, "provides": { "hashtypes": { - "file": "sql/hashtypes--0.1.sql", - "version": "0.1.0" + "file": "sql/hashtypes--0.1.4.sql", + "version": "0.1.4" } }, "resources": { "bugtracker": { - "web": "http://github.com/infofarmer/hashtypes/issues/" + "web": "http://github.com/adjust/hashtypes/issues/" }, "repository": { - "url": "git://github.com/infofarmer/hashtypes.git", - "web": "http://github.com/infofarmer/hashtypes/", + "url": "git://github.com/adjust/hashtypes.git", + "web": "http://github.com/adjust/hashtypes/", "type": "git" } }, diff --git a/Makefile b/Makefile index ac0b168..3da1994 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # $PostgreSQL$ -HASHTYPESVERSION = 0.1.3 +HASHTYPESVERSION = 0.1.4 MODULES = hashtypes EXTENSION = hashtypes DOCS = README.hashtypes diff --git a/README.hashtypes b/README.hashtypes index 35e0f48..047cd8f 100644 --- a/README.hashtypes +++ b/README.hashtypes @@ -1,4 +1,8 @@ This extension is actually a fork of shatypes[1] which adds some other data types as crc32 and provides some fixes to original implementations. +This project is a continuation of the project formerly at https://github.com/infofarmer/hashtypes. +Many thanks to Andrey Ropp, Infofarmer, and others for their work and support on the transition.[2] + [1]: http://pgfoundry.org/projects/shatypes +[2]: https://github.com/infofarmer/hashtypes/issues/7 diff --git a/hashtypes.control b/hashtypes.control index 03dfc69..509d8cc 100644 --- a/hashtypes.control +++ b/hashtypes.control @@ -1,4 +1,4 @@ comment = 'A set of data types for various hashes and control sums' -default_version = '0.1.3' +default_version = '0.1.4' encoding = 'utf8' superuser = true diff --git a/sql/crc32.sql b/sql/crc32.sql index e95bc25..d09e938 100644 --- a/sql/crc32.sql +++ b/sql/crc32.sql @@ -8,6 +8,7 @@ AS 'crc32_in' LANGUAGE C STRICT IMMUTABLE; + CREATE FUNCTION crc32_out(crc32) RETURNS cstring AS 'hashtypes', @@ -143,3 +144,22 @@ CREATE OPERATOR CLASS crc32_ops DEFAULT CREATE CAST (int4 AS crc32) WITHOUT FUNCTION AS ASSIGNMENT; CREATE CAST (crc32 AS int4) WITHOUT FUNCTION AS ASSIGNMENT; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION crc32_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32_out(crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32lt(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32le(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32eq(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32gt(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32ge(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32ne(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION btcrc32cmp(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION hashcrc32(crc32) PARALLEL SAFE $E$; + END IF; +END; +$$; diff --git a/sql/hashtypes--0.1.3--0.1.4.sql b/sql/hashtypes--0.1.3--0.1.4.sql new file mode 100644 index 0000000..eaf0ead --- /dev/null +++ b/sql/hashtypes--0.1.3--0.1.4.sql @@ -0,0 +1,158 @@ +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION crc32_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32_out(crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32lt(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32le(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32eq(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32gt(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32ge(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION crc32ne(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION btcrc32cmp(crc32, crc32) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION hashcrc32(crc32) PARALLEL SAFE $E$; + END IF; +END; +$$; + +-- this has to be run after pg upgrade too so not assuming the functions are missing +CREATE OR REPLACE FUNCTION md5hash(text) RETURNS md5hash LANGUAGE C IMMUTABLE STRICT AS 'hashtypes', 'text_to_md5'; +CREATE OR REPLACE FUNCTION md5hash(bytea) RETURNS md5hash language C IMMUTABLE STRICT AS 'hashtypes', 'bytea_to_md5'; +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION md5_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_out(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_send(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_recv(internal) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_lt(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_le(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_eq(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_gt(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_ge(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_ne(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_cmp(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_hash(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5hash(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5hash(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5t(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5b(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(md5hash) PARALLEL SAFE $E$; + END IF; +END; +$$; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION sha1_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha1_out(sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_lt(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_le(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_eq(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_gt(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_ge(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_neq(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_cmp(sha1, sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha1(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha1(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(sha1) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(sha1) PARALLEL SAFE $E$; + END IF; +END; +$$; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION sha224_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha224_out(sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_lt(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_le(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_eq(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_gt(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_ge(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_neq(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_cmp(sha224, sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha224(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha224(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(sha224) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(sha224) PARALLEL SAFE $E$; + END IF; +END; +$$; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION sha256_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha256_out(sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_lt(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_le(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_eq(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_gt(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_ge(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_neq(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_cmp(sha256, sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha256(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha256(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(sha256) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(sha256) PARALLEL SAFE $E$; + END IF; +END; +$$; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION sha384_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha384_out(sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_lt(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_le(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_eq(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_gt(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_ge(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_neq(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_cmp(sha384, sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha384(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha384(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(sha384) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(sha384) PARALLEL SAFE $E$; + END IF; +END; +$$; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION sha512_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha512_out(sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_lt(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_le(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_eq(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_gt(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_ge(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_neq(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_cmp(sha512, sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha512(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha512(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(sha512) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(sha512) PARALLEL SAFE $E$; + END IF; +END; +$$; diff --git a/sql/md5.sql b/sql/md5.sql index 90184b9..4c7e33e 100644 --- a/sql/md5.sql +++ b/sql/md5.sql @@ -52,9 +52,38 @@ CREATE FUNCTION text(md5hash) RETURNS TEXT LANGUAGE C IMMUTABLE STRICT AS 'hasht CREATE CAST (md5hash AS text) WITH FUNCTION text(md5hash) AS ASSIGNMENT; CREATE FUNCTION md5t(text) RETURNS md5hash LANGUAGE C IMMUTABLE STRICT AS 'hashtypes', 'text_to_md5'; +CREATE FUNCTION md5hash(text) RETURNS md5hash LANGUAGE C IMMUTABLE STRICT AS 'hashtypes', 'text_to_md5'; CREATE CAST (text AS md5hash) WITH FUNCTION md5t(text) AS ASSIGNMENT; CREATE FUNCTION md5b(bytea) RETURNS md5hash LANGUAGE C IMMUTABLE STRICT AS 'hashtypes', 'bytea_to_md5'; +CREATE FUNCTION md5hash(bytea) RETURNS md5hash language C IMMUTABLE STRICT AS 'hashtypes', 'bytea_to_md5'; CREATE CAST (bytea AS md5hash) WITH FUNCTION md5b(bytea) AS ASSIGNMENT; CREATE FUNCTION bytea(md5hash) RETURNS bytea LANGUAGE C IMMUTABLE STRICT AS 'hashtypes', 'md5_to_bytea'; CREATE CAST (md5hash AS bytea) WITH FUNCTION bytea(md5hash) AS ASSIGNMENT; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION md5_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_out(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_send(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_recv(internal) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_lt(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_le(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_eq(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_gt(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_ge(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_ne(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_cmp(md5hash,md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5_hash(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5hash(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5hash(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5t(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION md5b(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(md5hash) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(md5hash) PARALLEL SAFE $E$; + END IF; +END; +$$; diff --git a/sql/sha.sql.type b/sql/sha.sql.type index d90466f..6bbf8c3 100644 --- a/sql/sha.sql.type +++ b/sql/sha.sql.type @@ -49,3 +49,26 @@ CREATE FUNCTION sha@SHATYPE@(bytea) RETURNS sha@SHATYPE@ LANGUAGE C STRICT AS 'h CREATE FUNCTION bytea(sha@SHATYPE@) RETURNS bytea LANGUAGE C STRICT AS 'hashtypes', 'shabytea@SHATYPE@'; CREATE CAST (bytea AS sha@SHATYPE@) WITH FUNCTION sha@SHATYPE@(bytea) AS ASSIGNMENT; CREATE CAST (sha@SHATYPE@ AS bytea) WITH FUNCTION bytea(sha@SHATYPE@) AS ASSIGNMENT; + +DO $$ +DECLARE version_num integer; +BEGIN + SELECT current_setting('server_version_num') INTO STRICT version_num; + IF version_num > 90600 THEN + EXECUTE $E$ ALTER FUNCTION sha@SHATYPE@_in(cstring) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha@SHATYPE@_out(sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_lt(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_le(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_eq(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_gt(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_ge(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_neq(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha_cmp(sha@SHATYPE@, sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha@SHATYPE@(text) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION sha@SHATYPE@(bytea) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION text(sha@SHATYPE@) PARALLEL SAFE $E$; + EXECUTE $E$ ALTER FUNCTION bytea(sha@SHATYPE@) PARALLEL SAFE $E$; + END IF; +END; +$$; +