I am implementing consistent, union, compress, decompress, penalty, picksplit and same.
CREATE OPERATOR CLASS d_type_ops
DEFAULT FOR TYPE d_type USING gist AS
FUNCTION 1 d_type_consistent(internal, d_type, smallint, oid, internal),
FUNCTION 2 d_type_union(internal, internal),
FUNCTION 3 d_type_compress(internal),
FUNCTION 4 d_type_decompress(internal),
FUNCTION 5 d_type_penalty(internal, internal, internal),
FUNCTION 6 d_type_picksplit(internal, internal),
FUNCTION 7 d_type_same(internal, internal, internal);
The problem is that some of these methods take as input parameters the d_type and some the struct type that I internally implemented in c (which will be saved to the tree).
If I understand correctly consistent and compress are the only functions that will have input parameter of d_type. The others will have my c internal type.
Something else, will a non-leaf node have one entry that will be produced by union? I am asking because I want the leaf node entries to be of different type from non-leaf node entries (the difference between them is that non-leaf entry will not keep the id attribute).
Thank you in advance.