Commit d80d8acb authored by Tom Lane's avatar Tom Lane

Support functions for index opclasses should be immutable.

Found by running opr_sanity on contrib modules.
parent 92266303
......@@ -186,37 +186,37 @@ CREATE TYPE ghstore (
CREATE FUNCTION ghstore_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION ghstore_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_union(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_consistent(internal,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
-- register the opclass for indexing (not as default)
CREATE OPERATOR CLASS gist_hstore_ops
......@@ -241,23 +241,23 @@ AS
CREATE FUNCTION gin_extract_hstore(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_extract_hstore_query(internal, internal, int2)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_consistent_hstore(internal, int2, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C IMMUTABLE;
CREATE OPERATOR CLASS gin_hstore_ops
DEFAULT FOR TYPE hstore USING gin
AS
OPERATOR 7 @> RECHECK,
OPERATOR 9 ?(hstore,text),
OPERATOR 9 ?(hstore,text),
FUNCTION 1 bttextcmp(text,text),
FUNCTION 2 gin_extract_hstore(internal, internal),
FUNCTION 3 gin_extract_hstore_query(internal, internal, int2),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment