Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions
Дата
Msg-id 25263.1495998047@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions  (Andrew Borodin <borodin@octonica.com>)
Ответы Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions  (Andrew Borodin <borodin@octonica.com>)
Список pgsql-hackers
Andrew Borodin <borodin@octonica.com> writes:
> I'm not expert in toasting, cube's compress does nothing while cube
> decomress does detoasting. Is this for reason?

The original input datum could be toasted --- at least to the extent of
being compressed in-line or having short header; I do not think we allow
out-of-line storage in an index.  This is OK for storage within the index,
and it would also be OK for an IOS to return the value in that form.
But the opclass's consistent function might expect to be always given an
untoasted input, in which case you'd need the decompress function to fix
that up.

Mind you, I'm not saying that this would represent good design;
datatype-specific functions that expect somebody else to have
detoasted their input seem pretty fragile.  But it might be how
cube's GIST support works.
        regards, tom lane



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

Предыдущее
От: Andrew Borodin
Дата:
Сообщение: Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Index created in BEFORE trigger not updated during INSERT