Re: Index AM change proposals, redux

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: Index AM change proposals, redux
Дата
Msg-id 47FE5188.8060208@sigaev.ru
обсуждение исходный текст
Ответ на Re: Index AM change proposals, redux  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Index AM change proposals, redux  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>> GiST too, because type of storage may be differ from type to be indexed. The 
>> same touches GIN too.
> 
> Is this the case for *all* GiST and GIN indexes, or might we need a
> per-index (rather than per-AM) flag to tell whether the original keys
> are available?

Ughm. GiST and GIN are different here. For GiST it is clear that is  per index 
flag: - rtree emulation over box stores original values - rtree emulation over points or circles, btree_gist, ltree
storesmodified   original value which can be restored from index with call of specific   function - tsvector opclass
doesn'thave this possibility at all
 
So, only rtree emulation over box is able to return original value from index.
For GIN index I know only one opclass where it's possible to get original value, 
it's a wildspeed, but in any case that requires some transformation before. 
However, it's possible to develop opclass for GIN which will be similar to 
classic Btree, for indexing scalar values.

Both GIN and GiST make a call of transformation function before indexing value. 
I suppose, there is no automatic way to set this flag even in case when type of 
storage and type of indexing value are the same.

So, I see three variant: - add flag in pg_am - add flag to create operator class and by default it should point to
impossibilityto get value from index. At least for GIN and GiST.
 



-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] libpq type system 0.9a
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Index AM change proposals, redux