1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Fix assorted inconsistencies in GIN opclass support function declarations.

GIN had some minor issues too, mostly using "internal" where something
else would be more appropriate.  I went with the same approach as in
9ff60273e3, namely preferring the opclass' indexed datatype for
arguments that receive an operator RHS value, even if that's not
necessarily what they really are.

Again, this is with an eye to having a uniform rule for ginvalidate()
to check support function signatures.
This commit is contained in:
Tom Lane
2016-01-19 22:32:19 -05:00
parent 948c97958b
commit dbe2328959
6 changed files with 51 additions and 45 deletions

View File

@ -521,17 +521,17 @@ AS
-- GIN support
CREATE FUNCTION gin_extract_hstore(internal, internal)
CREATE FUNCTION gin_extract_hstore(hstore, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gin_extract_hstore_query(internal, internal, int2, internal, internal)
CREATE FUNCTION gin_extract_hstore_query(hstore, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gin_consistent_hstore(internal, int2, internal, int4, internal, internal)
CREATE FUNCTION gin_consistent_hstore(internal, int2, hstore, int4, internal, internal)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
@ -544,7 +544,7 @@ AS
OPERATOR 10 ?|(hstore,text[]),
OPERATOR 11 ?&(hstore,text[]),
FUNCTION 1 bttextcmp(text,text),
FUNCTION 2 gin_extract_hstore(internal, internal),
FUNCTION 3 gin_extract_hstore_query(internal, internal, int2, internal, internal),
FUNCTION 4 gin_consistent_hstore(internal, int2, internal, int4, internal, internal),
FUNCTION 2 gin_extract_hstore(hstore, internal),
FUNCTION 3 gin_extract_hstore_query(hstore, internal, int2, internal, internal),
FUNCTION 4 gin_consistent_hstore(internal, int2, hstore, int4, internal, internal),
STORAGE text;