From: Robert Haas Date: Tue, 14 Jun 2016 17:34:37 +0000 (-0400) Subject: Update extensions with GIN/GIST support for parallel query. X-Git-Tag: REL9_6_BETA2~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2910fc8239fa501b662c5459d7ba16a4bc35e7e8;p=postgresql Update extensions with GIN/GIST support for parallel query. Commit 749a787c5b25ae33b3d4da0ef12aa05214aa73c7 bumped the extension version on all of these extensions already, and we haven't had a release since then, so we can make further changes without bumping the extension version again. Take this opportunity to mark all of the functions exported by these modules PARALLEL SAFE -- except for pg_trgm's set_limit(). Mark that one PARALLEL RESTRICTED, because it makes a persistent change to a GUC value. Note that some of the markings added by this commit don't have any effect; for example, gseg_picksplit() isn't likely to be mentioned explicitly in a query and therefore it's parallel-safety marking will never be consulted. But this commit just marks everything for consistency: if it were somehow used in a query, that would be fine as far as parallel query is concerned, since it does not consult any backend-private state, attempt to write data, etc. Andreas Karlsson, with a few revisions by me. --- diff --git a/contrib/cube/cube--1.1--1.2.sql b/contrib/cube/cube--1.1--1.2.sql index 23280868eb..64a531e8b4 100644 --- a/contrib/cube/cube--1.1--1.2.sql +++ b/contrib/cube/cube--1.1--1.2.sql @@ -17,3 +17,44 @@ FROM (VALUES ('g_cube_distance(internal,cube,smallint,oid)', '{internal,cube,smallint,oid,internal}') ) AS update_data (oldproc, newtypes) WHERE oid = pg_catalog.to_regprocedure(oldproc); + +ALTER FUNCTION cube_in(cstring) PARALLEL SAFE; +ALTER FUNCTION cube(float8[], float8[]) PARALLEL SAFE; +ALTER FUNCTION cube(float8[]) PARALLEL SAFE; +ALTER FUNCTION cube_out(cube) PARALLEL SAFE; +ALTER FUNCTION cube_eq(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_ne(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_lt(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_gt(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_le(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_ge(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_cmp(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_contains(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_contained(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_overlap(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_union(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_inter(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_size(cube) PARALLEL SAFE; +ALTER FUNCTION cube_subset(cube, int4[]) PARALLEL SAFE; +ALTER FUNCTION cube_distance(cube, cube) PARALLEL SAFE; +ALTER FUNCTION distance_chebyshev(cube, cube) PARALLEL SAFE; +ALTER FUNCTION distance_taxicab(cube, cube) PARALLEL SAFE; +ALTER FUNCTION cube_dim(cube) PARALLEL SAFE; +ALTER FUNCTION cube_ll_coord(cube, int4) PARALLEL SAFE; +ALTER FUNCTION cube_ur_coord(cube, int4) PARALLEL SAFE; +ALTER FUNCTION cube_coord(cube, int4) PARALLEL SAFE; +ALTER FUNCTION cube_coord_llur(cube, int4) PARALLEL SAFE; +ALTER FUNCTION cube(float8) PARALLEL SAFE; +ALTER FUNCTION cube(float8, float8) PARALLEL SAFE; +ALTER FUNCTION cube(cube, float8) PARALLEL SAFE; +ALTER FUNCTION cube(cube, float8, float8) PARALLEL SAFE; +ALTER FUNCTION cube_is_point(cube) PARALLEL SAFE; +ALTER FUNCTION cube_enlarge(cube, float8, int4) PARALLEL SAFE; +ALTER FUNCTION g_cube_consistent(internal, cube, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_compress(internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_same(cube, cube, internal) PARALLEL SAFE; +ALTER FUNCTION g_cube_distance(internal, cube, smallint, oid, internal) PARALLEL SAFE; diff --git a/contrib/cube/cube--1.2.sql b/contrib/cube/cube--1.2.sql index 0a40e48b49..dea2614888 100644 --- a/contrib/cube/cube--1.2.sql +++ b/contrib/cube/cube--1.2.sql @@ -8,20 +8,20 @@ CREATE FUNCTION cube_in(cstring) RETURNS cube AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube(float8[], float8[]) RETURNS cube AS 'MODULE_PATHNAME', 'cube_a_f8_f8' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube(float8[]) RETURNS cube AS 'MODULE_PATHNAME', 'cube_a_f8' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_out(cube) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE TYPE cube ( INTERNALLENGTH = variable, @@ -41,70 +41,70 @@ COMMENT ON TYPE cube IS 'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT- CREATE FUNCTION cube_eq(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_eq(cube, cube) IS 'same as'; CREATE FUNCTION cube_ne(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_ne(cube, cube) IS 'different'; CREATE FUNCTION cube_lt(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_lt(cube, cube) IS 'lower than'; CREATE FUNCTION cube_gt(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_gt(cube, cube) IS 'greater than'; CREATE FUNCTION cube_le(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_le(cube, cube) IS 'lower than or equal to'; CREATE FUNCTION cube_ge(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_ge(cube, cube) IS 'greater than or equal to'; CREATE FUNCTION cube_cmp(cube, cube) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_cmp(cube, cube) IS 'btree comparison function'; CREATE FUNCTION cube_contains(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_contains(cube, cube) IS 'contains'; CREATE FUNCTION cube_contained(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_contained(cube, cube) IS 'contained in'; CREATE FUNCTION cube_overlap(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION cube_overlap(cube, cube) IS 'overlaps'; @@ -113,17 +113,17 @@ COMMENT ON FUNCTION cube_overlap(cube, cube) IS 'overlaps'; CREATE FUNCTION cube_union(cube, cube) RETURNS cube AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_inter(cube, cube) RETURNS cube AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_size(cube) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Misc N-dimensional functions @@ -131,81 +131,81 @@ LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION cube_subset(cube, int4[]) RETURNS cube AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- proximity routines CREATE FUNCTION cube_distance(cube, cube) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION distance_chebyshev(cube, cube) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION distance_taxicab(cube, cube) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Extracting elements functions CREATE FUNCTION cube_dim(cube) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_ll_coord(cube, int4) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_ur_coord(cube, int4) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_coord(cube, int4) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube_coord_llur(cube, int4) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube(float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_f8' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube(float8, float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_f8_f8' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube(cube, float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_c_f8' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION cube(cube, float8, float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_c_f8_f8' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Test if cube is also a point CREATE FUNCTION cube_is_point(cube) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Increasing the size of a cube by a radius in at least n dimensions CREATE FUNCTION cube_enlarge(cube, float8, int4) RETURNS cube AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- -- OPERATORS @@ -307,42 +307,42 @@ CREATE OPERATOR ~ ( CREATE FUNCTION g_cube_consistent(internal,cube,smallint,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_union(internal, internal) RETURNS cube AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_same(cube, cube, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_cube_distance (internal, cube, smallint, oid, internal) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Create the operator classes for indexing diff --git a/contrib/hstore/hstore--1.3--1.4.sql b/contrib/hstore/hstore--1.3--1.4.sql index 3c2bbf6191..d68956bb94 100644 --- a/contrib/hstore/hstore--1.3--1.4.sql +++ b/contrib/hstore/hstore--1.3--1.4.sql @@ -24,3 +24,61 @@ WHERE oid = pg_catalog.to_regprocedure(oldproc); UPDATE pg_catalog.pg_proc SET prorettype = 'ghstore'::pg_catalog.regtype WHERE oid = pg_catalog.to_regprocedure('ghstore_union(internal,internal)'); + +ALTER FUNCTION hstore_in(cstring) PARALLEL SAFE; +ALTER FUNCTION hstore_out(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_recv(internal) PARALLEL SAFE; +ALTER FUNCTION hstore_send(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_version_diag(hstore) PARALLEL SAFE; +ALTER FUNCTION fetchval(hstore, text) PARALLEL SAFE; +ALTER FUNCTION slice_array(hstore, text[]) PARALLEL SAFE; +ALTER FUNCTION slice(hstore, text[]) PARALLEL SAFE; +ALTER FUNCTION isexists(hstore, text) PARALLEL SAFE; +ALTER FUNCTION exist(hstore, text) PARALLEL SAFE; +ALTER FUNCTION exists_any(hstore, text[]) PARALLEL SAFE; +ALTER FUNCTION exists_all(hstore, text[]) PARALLEL SAFE; +ALTER FUNCTION isdefined(hstore, text) PARALLEL SAFE; +ALTER FUNCTION defined(hstore, text) PARALLEL SAFE; +ALTER FUNCTION delete(hstore, text) PARALLEL SAFE; +ALTER FUNCTION delete(hstore, text[]) PARALLEL SAFE; +ALTER FUNCTION delete(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hs_concat(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hs_contains(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hs_contained(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION tconvert(text, text) PARALLEL SAFE; +ALTER FUNCTION hstore(text, text) PARALLEL SAFE; +ALTER FUNCTION hstore(text[], text[]) PARALLEL SAFE; +ALTER FUNCTION hstore(text[]) PARALLEL SAFE; +ALTER FUNCTION hstore_to_json(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_to_json_loose(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_to_jsonb(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_to_jsonb_loose(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore(record) PARALLEL SAFE; +ALTER FUNCTION hstore_to_array(hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_to_matrix(hstore) PARALLEL SAFE; +ALTER FUNCTION akeys(hstore) PARALLEL SAFE; +ALTER FUNCTION avals(hstore) PARALLEL SAFE; +ALTER FUNCTION skeys(hstore) PARALLEL SAFE; +ALTER FUNCTION svals(hstore) PARALLEL SAFE; +ALTER FUNCTION each(hstore) PARALLEL SAFE; +ALTER FUNCTION populate_record(anyelement, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_eq(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_ne(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_gt(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_ge(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_lt(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_le(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_cmp(hstore, hstore) PARALLEL SAFE; +ALTER FUNCTION hstore_hash(hstore) PARALLEL SAFE; +ALTER FUNCTION ghstore_in(cstring) PARALLEL SAFE; +ALTER FUNCTION ghstore_out(ghstore) PARALLEL SAFE; +ALTER FUNCTION ghstore_compress(internal) PARALLEL SAFE; +ALTER FUNCTION ghstore_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION ghstore_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION ghstore_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION ghstore_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION ghstore_same(ghstore, ghstore, internal) PARALLEL SAFE; +ALTER FUNCTION ghstore_consistent(internal, hstore, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION gin_extract_hstore(hstore, internal) PARALLEL SAFE; +ALTER FUNCTION gin_extract_hstore_query(hstore, internal, int2, internal, internal) PARALLEL SAFE; +ALTER FUNCTION gin_consistent_hstore(internal, int2, hstore, int4, internal, internal) PARALLEL SAFE; diff --git a/contrib/hstore/hstore--1.4.sql b/contrib/hstore/hstore--1.4.sql index 2002969eec..4294d14ceb 100644 --- a/contrib/hstore/hstore--1.4.sql +++ b/contrib/hstore/hstore--1.4.sql @@ -8,22 +8,22 @@ CREATE TYPE hstore; CREATE FUNCTION hstore_in(cstring) RETURNS hstore AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_out(hstore) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_recv(internal) RETURNS hstore AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_send(hstore) RETURNS bytea AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE hstore ( INTERNALLENGTH = -1, @@ -37,12 +37,12 @@ CREATE TYPE hstore ( CREATE FUNCTION hstore_version_diag(hstore) RETURNS integer AS 'MODULE_PATHNAME','hstore_version_diag' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION fetchval(hstore,text) RETURNS text AS 'MODULE_PATHNAME','hstore_fetchval' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR -> ( LEFTARG = hstore, @@ -53,7 +53,7 @@ CREATE OPERATOR -> ( CREATE FUNCTION slice_array(hstore,text[]) RETURNS text[] AS 'MODULE_PATHNAME','hstore_slice_to_array' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR -> ( LEFTARG = hstore, @@ -64,17 +64,17 @@ CREATE OPERATOR -> ( CREATE FUNCTION slice(hstore,text[]) RETURNS hstore AS 'MODULE_PATHNAME','hstore_slice_to_hstore' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION isexists(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION exist(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ? ( LEFTARG = hstore, @@ -87,7 +87,7 @@ CREATE OPERATOR ? ( CREATE FUNCTION exists_any(hstore,text[]) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists_any' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ?| ( LEFTARG = hstore, @@ -100,7 +100,7 @@ CREATE OPERATOR ?| ( CREATE FUNCTION exists_all(hstore,text[]) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists_all' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ?& ( LEFTARG = hstore, @@ -113,27 +113,27 @@ CREATE OPERATOR ?& ( CREATE FUNCTION isdefined(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_defined' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION defined(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_defined' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION delete(hstore,text) RETURNS hstore AS 'MODULE_PATHNAME','hstore_delete' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION delete(hstore,text[]) RETURNS hstore AS 'MODULE_PATHNAME','hstore_delete_array' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION delete(hstore,hstore) RETURNS hstore AS 'MODULE_PATHNAME','hstore_delete_hstore' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR - ( LEFTARG = hstore, @@ -156,7 +156,7 @@ CREATE OPERATOR - ( CREATE FUNCTION hs_concat(hstore,hstore) RETURNS hstore AS 'MODULE_PATHNAME','hstore_concat' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR || ( LEFTARG = hstore, @@ -167,12 +167,12 @@ CREATE OPERATOR || ( CREATE FUNCTION hs_contains(hstore,hstore) RETURNS bool AS 'MODULE_PATHNAME','hstore_contains' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hs_contained(hstore,hstore) RETURNS bool AS 'MODULE_PATHNAME','hstore_contained' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR @> ( LEFTARG = hstore, @@ -214,22 +214,22 @@ CREATE OPERATOR ~ ( CREATE FUNCTION tconvert(text,text) RETURNS hstore AS 'MODULE_PATHNAME','hstore_from_text' -LANGUAGE C IMMUTABLE; -- not STRICT; needs to allow (key,NULL) +LANGUAGE C IMMUTABLE PARALLEL SAFE; -- not STRICT; needs to allow (key,NULL) CREATE FUNCTION hstore(text,text) RETURNS hstore AS 'MODULE_PATHNAME','hstore_from_text' -LANGUAGE C IMMUTABLE; -- not STRICT; needs to allow (key,NULL) +LANGUAGE C IMMUTABLE PARALLEL SAFE; -- not STRICT; needs to allow (key,NULL) CREATE FUNCTION hstore(text[],text[]) RETURNS hstore AS 'MODULE_PATHNAME', 'hstore_from_arrays' -LANGUAGE C IMMUTABLE; -- not STRICT; allows (keys,null) +LANGUAGE C IMMUTABLE PARALLEL SAFE; -- not STRICT; allows (keys,null) CREATE FUNCTION hstore(text[]) RETURNS hstore AS 'MODULE_PATHNAME', 'hstore_from_array' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE CAST (text[] AS hstore) WITH FUNCTION hstore(text[]); @@ -237,7 +237,7 @@ CREATE CAST (text[] AS hstore) CREATE FUNCTION hstore_to_json(hstore) RETURNS json AS 'MODULE_PATHNAME', 'hstore_to_json' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE CAST (hstore AS json) WITH FUNCTION hstore_to_json(hstore); @@ -245,12 +245,12 @@ CREATE CAST (hstore AS json) CREATE FUNCTION hstore_to_json_loose(hstore) RETURNS json AS 'MODULE_PATHNAME', 'hstore_to_json_loose' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION hstore_to_jsonb(hstore) RETURNS jsonb AS 'MODULE_PATHNAME', 'hstore_to_jsonb' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE CAST (hstore AS jsonb) WITH FUNCTION hstore_to_jsonb(hstore); @@ -258,17 +258,17 @@ CREATE CAST (hstore AS jsonb) CREATE FUNCTION hstore_to_jsonb_loose(hstore) RETURNS jsonb AS 'MODULE_PATHNAME', 'hstore_to_jsonb_loose' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION hstore(record) RETURNS hstore AS 'MODULE_PATHNAME', 'hstore_from_record' -LANGUAGE C IMMUTABLE; -- not STRICT; allows (null::recordtype) +LANGUAGE C IMMUTABLE PARALLEL SAFE; -- not STRICT; allows (null::recordtype) CREATE FUNCTION hstore_to_array(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_to_array' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR %% ( RIGHTARG = hstore, @@ -278,7 +278,7 @@ CREATE OPERATOR %% ( CREATE FUNCTION hstore_to_matrix(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_to_matrix' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR %# ( RIGHTARG = hstore, @@ -288,34 +288,34 @@ CREATE OPERATOR %# ( CREATE FUNCTION akeys(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_akeys' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION avals(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_avals' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION skeys(hstore) RETURNS setof text AS 'MODULE_PATHNAME','hstore_skeys' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION svals(hstore) RETURNS setof text AS 'MODULE_PATHNAME','hstore_svals' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION each(IN hs hstore, OUT key text, OUT value text) RETURNS SETOF record AS 'MODULE_PATHNAME','hstore_each' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION populate_record(anyelement,hstore) RETURNS anyelement AS 'MODULE_PATHNAME', 'hstore_populate_record' -LANGUAGE C IMMUTABLE; -- not STRICT; allows (null::rectype,hstore) +LANGUAGE C IMMUTABLE PARALLEL SAFE; -- not STRICT; allows (null::rectype,hstore) CREATE OPERATOR #= ( LEFTARG = anyelement, @@ -328,37 +328,37 @@ CREATE OPERATOR #= ( CREATE FUNCTION hstore_eq(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_eq' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_ne(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_ne' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_gt(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_gt' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_ge(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_ge' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_lt(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_lt' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_le(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_le' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION hstore_cmp(hstore,hstore) RETURNS integer AS 'MODULE_PATHNAME','hstore_cmp' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR = ( LEFTARG = hstore, @@ -437,7 +437,7 @@ AS CREATE FUNCTION hstore_hash(hstore) RETURNS integer AS 'MODULE_PATHNAME','hstore_hash' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR CLASS hash_hstore_ops DEFAULT FOR TYPE hstore USING hash @@ -452,12 +452,12 @@ CREATE TYPE ghstore; CREATE FUNCTION ghstore_in(cstring) RETURNS ghstore AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ghstore_out(ghstore) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE ghstore ( INTERNALLENGTH = -1, @@ -468,37 +468,37 @@ CREATE TYPE ghstore ( CREATE FUNCTION ghstore_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ghstore_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ghstore_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ghstore_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ghstore_union(internal, internal) RETURNS ghstore AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ghstore_same(ghstore, ghstore, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ghstore_consistent(internal,hstore,smallint,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OPERATOR CLASS gist_hstore_ops DEFAULT FOR TYPE hstore USING gist @@ -524,17 +524,17 @@ AS CREATE FUNCTION gin_extract_hstore(hstore, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gin_extract_hstore_query(hstore, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gin_consistent_hstore(internal, int2, hstore, int4, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OPERATOR CLASS gin_hstore_ops DEFAULT FOR TYPE hstore USING gin diff --git a/contrib/intarray/intarray--1.1--1.2.sql b/contrib/intarray/intarray--1.1--1.2.sql index 84db80618d..468f245ece 100644 --- a/contrib/intarray/intarray--1.1--1.2.sql +++ b/contrib/intarray/intarray--1.1--1.2.sql @@ -24,3 +24,56 @@ WHERE oid = pg_catalog.to_regprocedure(oldproc); UPDATE pg_catalog.pg_proc SET prorettype = 'intbig_gkey'::pg_catalog.regtype WHERE oid = pg_catalog.to_regprocedure('g_intbig_union(internal,internal)'); + +ALTER FUNCTION bqarr_in(cstring) PARALLEL SAFE; +ALTER FUNCTION bqarr_out(query_int) PARALLEL SAFE; +ALTER FUNCTION querytree(query_int) PARALLEL SAFE; +ALTER FUNCTION boolop(_int4, query_int) PARALLEL SAFE; +ALTER FUNCTION rboolop(query_int, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_matchsel(internal, oid, internal, integer) PARALLEL SAFE; +ALTER FUNCTION _int_contains(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_contained(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_overlap(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_same(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_different(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_union(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_inter(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION _int_overlap_sel(internal, oid, internal, integer) PARALLEL SAFE; +ALTER FUNCTION _int_contains_sel(internal, oid, internal, integer) PARALLEL SAFE; +ALTER FUNCTION _int_contained_sel(internal, oid, internal, integer) PARALLEL SAFE; +ALTER FUNCTION _int_overlap_joinsel(internal, oid, internal, smallint, internal) PARALLEL SAFE; +ALTER FUNCTION _int_contains_joinsel(internal, oid, internal, smallint, internal) PARALLEL SAFE; +ALTER FUNCTION _int_contained_joinsel(internal, oid, internal, smallint, internal) PARALLEL SAFE; +ALTER FUNCTION intset(int4) PARALLEL SAFE; +ALTER FUNCTION icount(_int4) PARALLEL SAFE; +ALTER FUNCTION sort(_int4, text) PARALLEL SAFE; +ALTER FUNCTION sort(_int4) PARALLEL SAFE; +ALTER FUNCTION sort_asc(_int4) PARALLEL SAFE; +ALTER FUNCTION sort_desc(_int4) PARALLEL SAFE; +ALTER FUNCTION uniq(_int4) PARALLEL SAFE; +ALTER FUNCTION idx(_int4, int4) PARALLEL SAFE; +ALTER FUNCTION subarray(_int4, int4, int4) PARALLEL SAFE; +ALTER FUNCTION subarray(_int4, int4) PARALLEL SAFE; +ALTER FUNCTION intarray_push_elem(_int4, int4) PARALLEL SAFE; +ALTER FUNCTION intarray_push_array(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION intarray_del_elem(_int4, int4) PARALLEL SAFE; +ALTER FUNCTION intset_union_elem(_int4, int4) PARALLEL SAFE; +ALTER FUNCTION intset_subtract(_int4, _int4) PARALLEL SAFE; +ALTER FUNCTION g_int_consistent(internal, _int4, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION g_int_compress(internal) PARALLEL SAFE; +ALTER FUNCTION g_int_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION g_int_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_int_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_int_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_int_same(_int4, _int4, internal) PARALLEL SAFE; +ALTER FUNCTION _intbig_in(cstring) PARALLEL SAFE; +ALTER FUNCTION _intbig_out(intbig_gkey) PARALLEL SAFE; +ALTER FUNCTION g_intbig_consistent(internal, _int4, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION g_intbig_compress(internal) PARALLEL SAFE; +ALTER FUNCTION g_intbig_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION g_intbig_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_intbig_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_intbig_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION g_intbig_same(intbig_gkey, intbig_gkey, internal) PARALLEL SAFE; +ALTER FUNCTION ginint4_queryextract(_int4, internal, int2, internal, internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION ginint4_consistent(internal, int2, _int4, int4, internal, internal, internal, internal) PARALLEL SAFE; diff --git a/contrib/intarray/intarray--1.2.sql b/contrib/intarray/intarray--1.2.sql index 16d0bc4ef2..f10b53db1c 100644 --- a/contrib/intarray/intarray--1.2.sql +++ b/contrib/intarray/intarray--1.2.sql @@ -11,12 +11,12 @@ CREATE FUNCTION bqarr_in(cstring) RETURNS query_int AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION bqarr_out(query_int) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE query_int ( INTERNALLENGTH = -1, @@ -28,27 +28,27 @@ CREATE TYPE query_int ( CREATE FUNCTION querytree(query_int) RETURNS text AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION boolop(_int4, query_int) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION boolop(_int4, query_int) IS 'boolean operation with array'; CREATE FUNCTION rboolop(query_int, _int4) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION rboolop(query_int, _int4) IS 'boolean operation with array'; CREATE FUNCTION _int_matchsel(internal, oid, internal, integer) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE OPERATOR @@ ( LEFTARG = _int4, @@ -78,35 +78,35 @@ CREATE OPERATOR ~~ ( CREATE FUNCTION _int_contains(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION _int_contains(_int4, _int4) IS 'contains'; CREATE FUNCTION _int_contained(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION _int_contained(_int4, _int4) IS 'contained in'; CREATE FUNCTION _int_overlap(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION _int_overlap(_int4, _int4) IS 'overlaps'; CREATE FUNCTION _int_same(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION _int_same(_int4, _int4) IS 'same as'; CREATE FUNCTION _int_different(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different'; @@ -115,42 +115,42 @@ COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different'; CREATE FUNCTION _int_union(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _int_inter(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _int_overlap_sel(internal, oid, internal, integer) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE FUNCTION _int_contains_sel(internal, oid, internal, integer) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE FUNCTION _int_contained_sel(internal, oid, internal, integer) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE FUNCTION _int_overlap_joinsel(internal, oid, internal, smallint, internal) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE FUNCTION _int_contains_joinsel(internal, oid, internal, smallint, internal) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE FUNCTION _int_contained_joinsel(internal, oid, internal, smallint, internal) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; -- -- OPERATORS @@ -228,12 +228,12 @@ CREATE OPERATOR ~ ( CREATE FUNCTION intset(int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION icount(_int4) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR # ( RIGHTARG = _int4, @@ -243,32 +243,32 @@ CREATE OPERATOR # ( CREATE FUNCTION sort(_int4, text) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION sort(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION sort_asc(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION sort_desc(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION uniq(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION idx(_int4, int4) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR # ( LEFTARG = _int4, @@ -279,17 +279,17 @@ CREATE OPERATOR # ( CREATE FUNCTION subarray(_int4, int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION subarray(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION intarray_push_elem(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR + ( LEFTARG = _int4, @@ -300,7 +300,7 @@ CREATE OPERATOR + ( CREATE FUNCTION intarray_push_array(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR + ( LEFTARG = _int4, @@ -312,7 +312,7 @@ CREATE OPERATOR + ( CREATE FUNCTION intarray_del_elem(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR - ( LEFTARG = _int4, @@ -323,7 +323,7 @@ CREATE OPERATOR - ( CREATE FUNCTION intset_union_elem(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR | ( LEFTARG = _int4, @@ -341,7 +341,7 @@ CREATE OPERATOR | ( CREATE FUNCTION intset_subtract(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR - ( LEFTARG = _int4, @@ -361,37 +361,37 @@ CREATE OPERATOR & ( CREATE FUNCTION g_int_consistent(internal,_int4,smallint,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_int_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_int_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_int_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_int_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_int_union(internal, internal) RETURNS _int4 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_int_same(_int4, _int4, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Create the operator class for indexing @@ -422,12 +422,12 @@ DEFAULT FOR TYPE _int4 USING gist AS CREATE FUNCTION _intbig_in(cstring) RETURNS intbig_gkey AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _intbig_out(intbig_gkey) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE intbig_gkey ( INTERNALLENGTH = -1, @@ -438,37 +438,37 @@ CREATE TYPE intbig_gkey ( CREATE FUNCTION g_intbig_consistent(internal,_int4,smallint,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_intbig_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_intbig_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_intbig_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_intbig_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_intbig_union(internal, internal) RETURNS intbig_gkey AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION g_intbig_same(intbig_gkey, intbig_gkey, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- register the opclass for indexing (not as default) @@ -496,12 +496,12 @@ AS CREATE FUNCTION ginint4_queryextract(_int4, internal, int2, internal, internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ginint4_consistent(internal, int2, _int4, int4, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OPERATOR CLASS gin__int_ops FOR TYPE _int4 USING gin diff --git a/contrib/ltree/ltree--1.0--1.1.sql b/contrib/ltree/ltree--1.0--1.1.sql index 7fe61d1c25..155751aa3a 100644 --- a/contrib/ltree/ltree--1.0--1.1.sql +++ b/contrib/ltree/ltree--1.0--1.1.sql @@ -27,3 +27,74 @@ WHERE oid = pg_catalog.to_regprocedure('ltree_union(internal,internal)'); UPDATE pg_catalog.pg_proc SET prorettype = 'ltree_gist'::pg_catalog.regtype WHERE oid = pg_catalog.to_regprocedure('_ltree_union(internal,internal)'); + +ALTER FUNCTION ltree_in(cstring) PARALLEL SAFE; +ALTER FUNCTION ltree_out(ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_cmp(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_lt(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_le(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_eq(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_ge(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_gt(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_ne(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION subltree(ltree, int4, int4) PARALLEL SAFE; +ALTER FUNCTION subpath(ltree, int4, int4) PARALLEL SAFE; +ALTER FUNCTION subpath(ltree, int4) PARALLEL SAFE; +ALTER FUNCTION index(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION index(ltree, ltree, int4) PARALLEL SAFE; +ALTER FUNCTION nlevel(ltree) PARALLEL SAFE; +ALTER FUNCTION ltree2text(ltree) PARALLEL SAFE; +ALTER FUNCTION text2ltree(text) PARALLEL SAFE; +ALTER FUNCTION lca(_ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree, ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree, ltree, ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree, ltree, ltree, ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_isparent(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_risparent(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_addltree(ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_addtext(ltree, text) PARALLEL SAFE; +ALTER FUNCTION ltree_textadd(text, ltree) PARALLEL SAFE; +ALTER FUNCTION ltreeparentsel(internal, oid, internal, integer) PARALLEL SAFE; +ALTER FUNCTION lquery_in(cstring) PARALLEL SAFE; +ALTER FUNCTION lquery_out(lquery) PARALLEL SAFE; +ALTER FUNCTION ltq_regex(ltree, lquery) PARALLEL SAFE; +ALTER FUNCTION ltq_rregex(lquery, ltree) PARALLEL SAFE; +ALTER FUNCTION lt_q_regex(ltree, _lquery) PARALLEL SAFE; +ALTER FUNCTION lt_q_rregex(_lquery, ltree) PARALLEL SAFE; +ALTER FUNCTION ltxtq_in(cstring) PARALLEL SAFE; +ALTER FUNCTION ltxtq_out(ltxtquery) PARALLEL SAFE; +ALTER FUNCTION ltxtq_exec(ltree, ltxtquery) PARALLEL SAFE; +ALTER FUNCTION ltxtq_rexec(ltxtquery, ltree) PARALLEL SAFE; +ALTER FUNCTION ltree_gist_in(cstring) PARALLEL SAFE; +ALTER FUNCTION ltree_gist_out(ltree_gist) PARALLEL SAFE; +ALTER FUNCTION ltree_consistent(internal, ltree, int2, oid, internal) PARALLEL SAFE; +ALTER FUNCTION ltree_compress(internal) PARALLEL SAFE; +ALTER FUNCTION ltree_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION ltree_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION ltree_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION ltree_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION ltree_same(ltree_gist, ltree_gist, internal) PARALLEL SAFE; +ALTER FUNCTION _ltree_isparent(_ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION _ltree_r_isparent(ltree, _ltree) PARALLEL SAFE; +ALTER FUNCTION _ltree_risparent(_ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION _ltree_r_risparent(ltree, _ltree) PARALLEL SAFE; +ALTER FUNCTION _ltq_regex(_ltree, lquery) PARALLEL SAFE; +ALTER FUNCTION _ltq_rregex(lquery, _ltree) PARALLEL SAFE; +ALTER FUNCTION _lt_q_regex(_ltree, _lquery) PARALLEL SAFE; +ALTER FUNCTION _lt_q_rregex(_lquery, _ltree) PARALLEL SAFE; +ALTER FUNCTION _ltxtq_exec(_ltree, ltxtquery) PARALLEL SAFE; +ALTER FUNCTION _ltxtq_rexec(ltxtquery, _ltree) PARALLEL SAFE; +ALTER FUNCTION _ltree_extract_isparent(_ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION _ltree_extract_risparent(_ltree, ltree) PARALLEL SAFE; +ALTER FUNCTION _ltq_extract_regex(_ltree, lquery) PARALLEL SAFE; +ALTER FUNCTION _ltxtq_extract_exec(_ltree, ltxtquery) PARALLEL SAFE; +ALTER FUNCTION _ltree_consistent(internal, _ltree, int2, oid, internal) PARALLEL SAFE; +ALTER FUNCTION _ltree_compress(internal) PARALLEL SAFE; +ALTER FUNCTION _ltree_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION _ltree_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION _ltree_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION _ltree_same(ltree_gist, ltree_gist, internal) PARALLEL SAFE; diff --git a/contrib/ltree/ltree--1.1.sql b/contrib/ltree/ltree--1.1.sql index 1e04ce6489..d46f5fcd02 100644 --- a/contrib/ltree/ltree--1.1.sql +++ b/contrib/ltree/ltree--1.1.sql @@ -6,12 +6,12 @@ CREATE FUNCTION ltree_in(cstring) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_out(ltree) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE ltree ( INTERNALLENGTH = -1, @@ -25,37 +25,37 @@ CREATE TYPE ltree ( CREATE FUNCTION ltree_cmp(ltree,ltree) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_lt(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_le(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_eq(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_ge(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_gt(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_ne(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR < ( @@ -125,112 +125,112 @@ CREATE OPERATOR <> ( CREATE FUNCTION subltree(ltree,int4,int4) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION subpath(ltree,int4,int4) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION subpath(ltree,int4) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION index(ltree,ltree) RETURNS int4 AS 'MODULE_PATHNAME', 'ltree_index' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION index(ltree,ltree,int4) RETURNS int4 AS 'MODULE_PATHNAME', 'ltree_index' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION nlevel(ltree) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree2text(ltree) RETURNS text AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION text2ltree(text) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(_ltree) RETURNS ltree AS 'MODULE_PATHNAME','_lca' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_isparent(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_risparent(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_addltree(ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_addtext(ltree,text) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_textadd(text,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltreeparentsel(internal, oid, internal, integer) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR @> ( LEFTARG = ltree, @@ -303,12 +303,12 @@ CREATE OPERATOR CLASS ltree_ops CREATE FUNCTION lquery_in(cstring) RETURNS lquery AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lquery_out(lquery) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE lquery ( INTERNALLENGTH = -1, @@ -320,12 +320,12 @@ CREATE TYPE lquery ( CREATE FUNCTION ltq_regex(ltree,lquery) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltq_rregex(lquery,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ~ ( LEFTARG = ltree, @@ -367,12 +367,12 @@ CREATE OPERATOR ^~ ( CREATE FUNCTION lt_q_regex(ltree,_lquery) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION lt_q_rregex(_lquery,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ? ( LEFTARG = ltree, @@ -414,12 +414,12 @@ CREATE OPERATOR ^? ( CREATE FUNCTION ltxtq_in(cstring) RETURNS ltxtquery AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltxtq_out(ltxtquery) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE ltxtquery ( INTERNALLENGTH = -1, @@ -433,12 +433,12 @@ CREATE TYPE ltxtquery ( CREATE FUNCTION ltxtq_exec(ltree, ltxtquery) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltxtq_rexec(ltxtquery, ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR @ ( LEFTARG = ltree, @@ -481,12 +481,12 @@ CREATE OPERATOR ^@ ( CREATE FUNCTION ltree_gist_in(cstring) RETURNS ltree_gist AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION ltree_gist_out(ltree_gist) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE ltree_gist ( internallength = -1, @@ -497,25 +497,25 @@ CREATE TYPE ltree_gist ( CREATE FUNCTION ltree_consistent(internal,ltree,int2,oid,internal) -RETURNS bool as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS bool as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ltree_compress(internal) -RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ltree_decompress(internal) -RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ltree_penalty(internal,internal,internal) -RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ltree_picksplit(internal, internal) -RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ltree_union(internal, internal) -RETURNS ltree_gist as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS ltree_gist as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION ltree_same(ltree_gist, ltree_gist, internal) -RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; +RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OPERATOR CLASS gist_ltree_ops DEFAULT FOR TYPE ltree USING gist AS @@ -547,52 +547,52 @@ CREATE OPERATOR CLASS gist_ltree_ops CREATE FUNCTION _ltree_isparent(_ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltree_r_isparent(ltree,_ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltree_risparent(_ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltree_r_risparent(ltree,_ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltq_regex(_ltree,lquery) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltq_rregex(lquery,_ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _lt_q_regex(_ltree,_lquery) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _lt_q_rregex(_lquery,_ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltxtq_exec(_ltree, ltxtquery) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION _ltxtq_rexec(ltxtquery, _ltree) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR @> ( LEFTARG = _ltree, @@ -780,7 +780,7 @@ CREATE OPERATOR ^@ ( CREATE FUNCTION _ltree_extract_isparent(_ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ?@> ( LEFTARG = _ltree, @@ -791,7 +791,7 @@ CREATE OPERATOR ?@> ( CREATE FUNCTION _ltree_extract_risparent(_ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ?<@ ( LEFTARG = _ltree, @@ -802,7 +802,7 @@ CREATE OPERATOR ?<@ ( CREATE FUNCTION _ltq_extract_regex(_ltree,lquery) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ?~ ( LEFTARG = _ltree, @@ -813,7 +813,7 @@ CREATE OPERATOR ?~ ( CREATE FUNCTION _ltxtq_extract_exec(_ltree,ltxtquery) RETURNS ltree AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR ?@ ( LEFTARG = _ltree, @@ -825,32 +825,32 @@ CREATE OPERATOR ?@ ( CREATE FUNCTION _ltree_consistent(internal,_ltree,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION _ltree_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION _ltree_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION _ltree_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION _ltree_union(internal, internal) RETURNS ltree_gist AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION _ltree_same(ltree_gist, ltree_gist, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OPERATOR CLASS gist__ltree_ops DEFAULT FOR TYPE _ltree USING gist AS diff --git a/contrib/pg_trgm/pg_trgm--1.2--1.3.sql b/contrib/pg_trgm/pg_trgm--1.2--1.3.sql index a647c7eeb2..c37c99b65a 100644 --- a/contrib/pg_trgm/pg_trgm--1.2--1.3.sql +++ b/contrib/pg_trgm/pg_trgm--1.2--1.3.sql @@ -22,3 +22,29 @@ WHERE oid = pg_catalog.to_regprocedure(oldproc); UPDATE pg_catalog.pg_proc SET prorettype = 'gtrgm'::pg_catalog.regtype WHERE oid = pg_catalog.to_regprocedure('gtrgm_union(internal,internal)'); + +ALTER FUNCTION set_limit(float4) PARALLEL RESTRICTED; +ALTER FUNCTION show_limit() PARALLEL SAFE; +ALTER FUNCTION show_trgm(text) PARALLEL SAFE; +ALTER FUNCTION similarity(text, text) PARALLEL SAFE; +ALTER FUNCTION similarity_op(text, text) PARALLEL SAFE; +ALTER FUNCTION word_similarity(text, text) PARALLEL SAFE; +ALTER FUNCTION word_similarity_op(text, text) PARALLEL SAFE; +ALTER FUNCTION word_similarity_commutator_op(text, text) PARALLEL SAFE; +ALTER FUNCTION similarity_dist(text, text) PARALLEL SAFE; +ALTER FUNCTION word_similarity_dist_op(text, text) PARALLEL SAFE; +ALTER FUNCTION word_similarity_dist_commutator_op(text, text) PARALLEL SAFE; +ALTER FUNCTION gtrgm_in(cstring) PARALLEL SAFE; +ALTER FUNCTION gtrgm_out(gtrgm) PARALLEL SAFE; +ALTER FUNCTION gtrgm_consistent(internal, text, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_distance(internal, text, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_compress(internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION gtrgm_same(gtrgm, gtrgm, internal) PARALLEL SAFE; +ALTER FUNCTION gin_extract_value_trgm(text, internal) PARALLEL SAFE; +ALTER FUNCTION gin_extract_query_trgm(text, internal, int2, internal, internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION gin_trgm_consistent(internal, int2, text, int4, internal, internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION gin_trgm_triconsistent(internal, int2, text, int4, internal, internal, internal) PARALLEL SAFE; diff --git a/contrib/pg_trgm/pg_trgm--1.3.sql b/contrib/pg_trgm/pg_trgm--1.3.sql index 8b8be3c472..b279f7d7ac 100644 --- a/contrib/pg_trgm/pg_trgm--1.3.sql +++ b/contrib/pg_trgm/pg_trgm--1.3.sql @@ -7,28 +7,28 @@ CREATE FUNCTION set_limit(float4) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT VOLATILE; +LANGUAGE C STRICT VOLATILE PARALLEL RESTRICTED; -- Deprecated function CREATE FUNCTION show_limit() RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; +LANGUAGE C STRICT STABLE PARALLEL SAFE; CREATE FUNCTION show_trgm(text) RETURNS _text AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION similarity(text,text) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION similarity_op(text,text) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; -- stable because depends on pg_trgm.similarity_threshold +LANGUAGE C STRICT STABLE PARALLEL SAFE; -- stable because depends on pg_trgm.similarity_threshold CREATE OPERATOR % ( LEFTARG = text, @@ -42,17 +42,17 @@ CREATE OPERATOR % ( CREATE FUNCTION word_similarity(text,text) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION word_similarity_op(text,text) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; -- stable because depends on pg_trgm.word_similarity_threshold +LANGUAGE C STRICT STABLE PARALLEL SAFE; -- stable because depends on pg_trgm.word_similarity_threshold CREATE FUNCTION word_similarity_commutator_op(text,text) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT STABLE; -- stable because depends on pg_trgm.word_similarity_threshold +LANGUAGE C STRICT STABLE PARALLEL SAFE; -- stable because depends on pg_trgm.word_similarity_threshold CREATE OPERATOR <% ( LEFTARG = text, @@ -75,7 +75,7 @@ CREATE OPERATOR %> ( CREATE FUNCTION similarity_dist(text,text) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR <-> ( LEFTARG = text, @@ -87,12 +87,12 @@ CREATE OPERATOR <-> ( CREATE FUNCTION word_similarity_dist_op(text,text) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION word_similarity_dist_commutator_op(text,text) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE OPERATOR <<-> ( LEFTARG = text, @@ -112,12 +112,12 @@ CREATE OPERATOR <->> ( CREATE FUNCTION gtrgm_in(cstring) RETURNS gtrgm AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION gtrgm_out(gtrgm) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE gtrgm ( INTERNALLENGTH = -1, @@ -129,42 +129,42 @@ CREATE TYPE gtrgm ( CREATE FUNCTION gtrgm_consistent(internal,text,smallint,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_distance(internal,text,smallint,oid,internal) RETURNS float8 AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_union(internal, internal) RETURNS gtrgm AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gtrgm_same(gtrgm, gtrgm, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- create the operator class for gist CREATE OPERATOR CLASS gist_trgm_ops @@ -207,17 +207,17 @@ ALTER OPERATOR FAMILY gist_trgm_ops USING gist ADD CREATE FUNCTION gin_extract_value_trgm(text, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gin_extract_query_trgm(text, internal, int2, internal, internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gin_trgm_consistent(internal, int2, text, int4, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- create the operator class for gin CREATE OPERATOR CLASS gin_trgm_ops @@ -247,7 +247,7 @@ ALTER OPERATOR FAMILY gin_trgm_ops USING gin ADD CREATE FUNCTION gin_trgm_triconsistent(internal, int2, text, int4, internal, internal, internal) RETURNS "char" AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; ALTER OPERATOR FAMILY gin_trgm_ops USING gin ADD OPERATOR 7 %> (text, text), diff --git a/contrib/seg/seg--1.0--1.1.sql b/contrib/seg/seg--1.0--1.1.sql index ef06f359ec..2dcd4d4280 100644 --- a/contrib/seg/seg--1.0--1.1.sql +++ b/contrib/seg/seg--1.0--1.1.sql @@ -1,6 +1,6 @@ /* contrib/seg/seg--1.0--1.1.sql */ --- complain if script is sourced in psql, rather than via CREATE EXTENSION +-- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION seg UPDATE TO '1.1'" to load this file. \quit -- Update procedure signatures the hard way. @@ -16,3 +16,33 @@ FROM (VALUES ('gseg_consistent(internal,seg,int4,oid,internal)', '{internal,seg,int2,oid,internal}') ) AS update_data (oldproc, newtypes) WHERE oid = pg_catalog.to_regprocedure(oldproc); + +ALTER FUNCTION seg_in(cstring) PARALLEL SAFE; +ALTER FUNCTION seg_out(seg) PARALLEL SAFE; +ALTER FUNCTION seg_over_left(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_over_right(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_left(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_right(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_lt(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_le(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_gt(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_ge(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_contains(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_contained(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_overlap(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_same(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_different(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_cmp(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_union(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_inter(seg, seg) PARALLEL SAFE; +ALTER FUNCTION seg_size(seg) PARALLEL SAFE; +ALTER FUNCTION seg_center(seg) PARALLEL SAFE; +ALTER FUNCTION seg_upper(seg) PARALLEL SAFE; +ALTER FUNCTION seg_lower(seg) PARALLEL SAFE; +ALTER FUNCTION gseg_consistent(internal, seg, smallint, oid, internal) PARALLEL SAFE; +ALTER FUNCTION gseg_compress(internal) PARALLEL SAFE; +ALTER FUNCTION gseg_decompress(internal) PARALLEL SAFE; +ALTER FUNCTION gseg_penalty(internal, internal, internal) PARALLEL SAFE; +ALTER FUNCTION gseg_picksplit(internal, internal) PARALLEL SAFE; +ALTER FUNCTION gseg_union(internal, internal) PARALLEL SAFE; +ALTER FUNCTION gseg_same(seg, seg, internal) PARALLEL SAFE; diff --git a/contrib/seg/seg--1.1.sql b/contrib/seg/seg--1.1.sql index a1550ab9e0..d95aabcfca 100644 --- a/contrib/seg/seg--1.1.sql +++ b/contrib/seg/seg--1.1.sql @@ -8,12 +8,12 @@ CREATE FUNCTION seg_in(cstring) RETURNS seg AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION seg_out(seg) RETURNS cstring AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE TYPE seg ( INTERNALLENGTH = 12, @@ -33,7 +33,7 @@ COMMENT ON TYPE seg IS CREATE FUNCTION seg_over_left(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_over_left(seg, seg) IS 'overlaps or is left of'; @@ -41,7 +41,7 @@ COMMENT ON FUNCTION seg_over_left(seg, seg) IS CREATE FUNCTION seg_over_right(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_over_right(seg, seg) IS 'overlaps or is right of'; @@ -49,7 +49,7 @@ COMMENT ON FUNCTION seg_over_right(seg, seg) IS CREATE FUNCTION seg_left(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_left(seg, seg) IS 'is left of'; @@ -57,7 +57,7 @@ COMMENT ON FUNCTION seg_left(seg, seg) IS CREATE FUNCTION seg_right(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_right(seg, seg) IS 'is right of'; @@ -68,7 +68,7 @@ COMMENT ON FUNCTION seg_right(seg, seg) IS CREATE FUNCTION seg_lt(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_lt(seg, seg) IS 'less than'; @@ -76,7 +76,7 @@ COMMENT ON FUNCTION seg_lt(seg, seg) IS CREATE FUNCTION seg_le(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_le(seg, seg) IS 'less than or equal'; @@ -84,7 +84,7 @@ COMMENT ON FUNCTION seg_le(seg, seg) IS CREATE FUNCTION seg_gt(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_gt(seg, seg) IS 'greater than'; @@ -92,7 +92,7 @@ COMMENT ON FUNCTION seg_gt(seg, seg) IS CREATE FUNCTION seg_ge(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_ge(seg, seg) IS 'greater than or equal'; @@ -100,7 +100,7 @@ COMMENT ON FUNCTION seg_ge(seg, seg) IS CREATE FUNCTION seg_contains(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_contains(seg, seg) IS 'contains'; @@ -108,7 +108,7 @@ COMMENT ON FUNCTION seg_contains(seg, seg) IS CREATE FUNCTION seg_contained(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_contained(seg, seg) IS 'contained in'; @@ -116,7 +116,7 @@ COMMENT ON FUNCTION seg_contained(seg, seg) IS CREATE FUNCTION seg_overlap(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_overlap(seg, seg) IS 'overlaps'; @@ -124,7 +124,7 @@ COMMENT ON FUNCTION seg_overlap(seg, seg) IS CREATE FUNCTION seg_same(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_same(seg, seg) IS 'same as'; @@ -132,7 +132,7 @@ COMMENT ON FUNCTION seg_same(seg, seg) IS CREATE FUNCTION seg_different(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_different(seg, seg) IS 'different'; @@ -142,41 +142,41 @@ COMMENT ON FUNCTION seg_different(seg, seg) IS CREATE FUNCTION seg_cmp(seg, seg) RETURNS int4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; COMMENT ON FUNCTION seg_cmp(seg, seg) IS 'btree comparison function'; CREATE FUNCTION seg_union(seg, seg) RETURNS seg AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION seg_inter(seg, seg) RETURNS seg AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION seg_size(seg) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; -- miscellaneous CREATE FUNCTION seg_center(seg) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION seg_upper(seg) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; CREATE FUNCTION seg_lower(seg) RETURNS float4 AS 'MODULE_PATHNAME' -LANGUAGE C STRICT IMMUTABLE; +LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE; -- @@ -329,37 +329,37 @@ CREATE OPERATOR ~ ( CREATE FUNCTION gseg_consistent(internal,seg,smallint,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gseg_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gseg_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gseg_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gseg_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gseg_union(internal, internal) RETURNS seg AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION gseg_same(seg, seg, internal) RETURNS internal AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Create the operator classes for indexing