Skip to content

Commit

Permalink
Parallelism for 9.6 (#8)
Browse files Browse the repository at this point in the history
Changelog added
PGXN files bumped for release
Parallelism added for 9.6
md5 hash function added that are consistent with casting conventions
  • Loading branch information
einhverfr authored Nov 14, 2017
1 parent 954283d commit 2eca2d1
Show file tree
Hide file tree
Showing 11 changed files with 263 additions and 11 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand All @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changes since 0.1.1:

1. Join operations now provide correct estimates
2. Functions correctly marked immutable when immutable
8 changes: 8 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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
14 changes: 7 additions & 7 deletions META.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"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 <chris.travers@adjust.com>", "Manuel Kniep <[email protected]>"],
"license": "postgresql",
"meta-spec": {
"version": "1.0.0",
"url": "http://pgxn.org/meta/spec.txt"
},
"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"
}
},
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $PostgreSQL$

HASHTYPESVERSION = 0.1.3
HASHTYPESVERSION = 0.1.4
MODULES = hashtypes
EXTENSION = hashtypes
DOCS = README.hashtypes
Expand Down
4 changes: 4 additions & 0 deletions README.hashtypes
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion hashtypes.control
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions sql/crc32.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AS
'crc32_in'
LANGUAGE C STRICT IMMUTABLE;


CREATE FUNCTION crc32_out(crc32) RETURNS cstring
AS
'hashtypes',
Expand Down Expand Up @@ -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;
$$;
158 changes: 158 additions & 0 deletions sql/hashtypes--0.1.3--0.1.4.sql
Original file line number Diff line number Diff line change
@@ -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;
$$;
29 changes: 29 additions & 0 deletions sql/md5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
$$;
23 changes: 23 additions & 0 deletions sql/sha.sql.type
Original file line number Diff line number Diff line change
Expand Up @@ -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;
$$;

0 comments on commit 2eca2d1

Please sign in to comment.