Skip site navigation (1) Skip section navigation (2)

Re: gist access methods parameter types

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Marios Vodas <mvodas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: gist access methods parameter types
Date: 2010-09-27 13:38:38
Message-ID: AANLkTi=yH_YWN+PxY-MJWQ0qS1bvaHa1UGXhG=ePy9gr@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Sep 27, 2010 at 4:26 AM, Marios Vodas <mvodas(at)gmail(dot)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

In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-09-27 13:40:01
Subject: Re: A small update for postgresql.conf.sample
Previous:From: Guillaume LelargeDate: 2010-09-27 13:30:23
Subject: Re: A small update for postgresql.conf.sample

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group