Re: A doubt..

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A doubt..
Date: 2006-02-23 05:36:04
Message-ID: dtjhqb$2itf$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Dhanaraj" <Dhanaraj(dot)M(at)Sun(dot)COM> wrote
> Hi all
>
> I looked at B-tree and r-tree implementations. However i could not find
> out where it is used.

The secret is in index_getnext(), which is a general cap for all index
access methods. First it retrieves the correct AM from the pg_am system
catalog:

test=# select amname, amgettuple from pg_am;
AMNAME | AMGETTUPLE
--------+--------------
RTREE | RTGETTUPLE
BTREE | BTGETTUPLE
HASH | HASHGETTUPLE
GIST | GISTGETTUPLE
(4 rows)

Thus, for btree, it will use btgettuple() for the operation ...

> It seems that the data retrieved from the data
> base is kept in the tuple data structure.
>
If you mean there is no conversion from disk format to memory format (vice
versa), then yes. Especially you may notice that the algined data items on
the data page are kept aligned in both memory and disk.

Regards,
Qingqing

In response to

  • A doubt.. at 2006-02-22 14:13:30 from Dhanaraj

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2006-02-23 06:21:34 Re: Request: set opclass for generated unique and primary key indexes
Previous Message Jim C. Nasby 2006-02-23 03:48:33 Re: PostgreSQL unit tests