On Mon, Sep 27, 2010 at 4:26 AM, Marios Vodas <mvodas@gmail.com> wrote:
> 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?
It looks to me like you need to read the documentation on this topic.
http://www.postgresql.org/docs/current/static/gist-implementation.html
From what I can gather from said documentation, consistent will indeed
get the data type as an argument, but compress does not.
You might also want to look at contrib/btree_gist.
> Something else, will a non-leaf node have one entry that will be produced by
> union?
I believe that's correct.
> 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.
I don't think this is a good idea. I suspect you want to keep the id
attribute never, and use the recheck stuff.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company