Re: query - change in gistentryinit between 8.1 and 8.2

Lists: pgsql-hackers
From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: query - change in gistentryinit between 8.1 and 8.2
Date: 2009-07-26 18:39:40
Message-ID: 162867790907261139m55cd15f2t5695d8250ec01dcb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello,

I try to write GiST support for one custom type and I am not sure
about compress function. I don't understand where I can specify size
of returned compressed key. 8.1 and older had 6. parameter for size,
but this parameter is missing in new versions.

Can somebody explain, where pg take info about size of compressed key?

Thank You
Pavel Stehule


From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: query - change in gistentryinit between 8.1 and 8.2
Date: 2009-07-27 10:40:55
Message-ID: 87prbmmmrs.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> I try to write GiST support for one custom type and I am not sure
> about compress function. I don't understand where I can specify size
> of returned compressed key. 8.1 and older had 6. parameter for size,
> but this parameter is missing in new versions.

The compress function is only useful for storing different values on
leaves than on the column you're indexing, AFAIUI. So what you could do
is make this internal type SQL visible, then use it in the STORAGE
option of the CREATE OPERATOR CLASS command.

I'm unsure how correct an answer this is, though...
--
dim