Обсуждение: question about API to b-tree in PG

Поиск
Список
Период
Сортировка

question about API to b-tree in PG

От
GeGeZ
Дата:
Hello,this is my first post, so "Hello" again :)
I have a problem. I am trying to create another implementation of FTI in 
PG. What will be different? I am going to create my new index on text 
type field:CREATE TABLE test (id int, mytext text);CREATE INDEX myindex on test USING myindex (mytext) ;

The myindex index will be just ordinary postgresql's btree on tokenized 
text (so before inserting into btree, I will tokenize text, and then I 
will insert every found token). I mean, instead of keeping text in 
index, I will keep terms from tokenized column mytext. So:
insert INTO test(1,'this is my first text');
In index I would like to keep following objects: 'this', 'is', 'my', 
'first', 'text'.

My question is how to access btree index using API (not by operators, 
etc.). Espiecialy, I need following functions:
create "empty" btree index (I do not know how to create index without 
table connected to it)
insert tuple
remove tuple
destroy index
find term in btree index.

Is there any manual to btree API?

I found only pure C source files:
src/backend/access/index and src/backend/access/nbtree.

Sorry for my poor English,
Yours,
Gegez