gist access methods parameter types

Поиск
Список
Период
Сортировка
От Marios Vodas
Тема gist access methods parameter types
Дата
Msg-id AANLkTikj3ALyoHSzTXddw95hJ0w33U1xAvSr7pfBuc4R@mail.gmail.com
обсуждение исходный текст
Ответы Re: gist access methods parameter types  (Robert Haas <robertmhaas@gmail.com>)
Re: gist access methods parameter types  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-hackers
If I have this sql composite type:
CREATE TYPE d_type AS
(
i integer,
e integer,
id integer
);
and this table:
CREATE TABLE my_tab
(
   d_col d_type NOT NULL
)

CREATE INDEX my_tab_d_col_gist ON my_tab USING gist (d_col);

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.
Is this correct?
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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: do we want to gitignore regression-test-failure files?
Следующее
От: Bernd Helmle
Дата:
Сообщение: Re: Patch: Extend NOT NULL representation to pg_constraint