Varlena Type Creation

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Varlena Type Creation
Дата
Msg-id 200802261819.51401.dfontaine@hi-media.com
обсуждение исходный текст
Ответы Re: Varlena Type Creation  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Hi,

I'm working on a GiST opclass to support prefix searching as presented here:
http://pgsql.tapoueh.org/site/html/prefix/index.htmlhttp://prefix.projects.postgresql.org/README.html
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/prefix/prefix/

In order to have a much more efficient index, I received the advice to
implement a prefix range datatype then base the picksplit() and union()
implementation on top of it.

So... where do I start to create a varlena datatype which has to store the 3
following values: text prefix, char start, char end.

It's not clear for me whether this is what I need to provide:

typedef struct
{   int32    vl_len_;   char    start;   char    end;   text        prefix;
} prefix_range;

In particular, I've been taught a varlena definition can not contain pointers,
and I've no idea how to embed a text into another varlena...

Regards,
--
dim

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pg_dump additional options for performance
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Including PL/PgSQL by default