My opinion is that second way is right (use GISTENTRY array). But this channge
requires changes in GiST API: picksplit and union functions must retrieve one
argument more. Is it possible to make for 7.2.1 or such changes must be appyed
in TODO for 7.3 ?
Tom Lane wrote:
> I think you have two possible ways to proceed:
>
> 1. Modify the code to use MAXALIGN(VARHDRSZ) rather than just VARHDRSZ
> as the offset in the bogus bytea construct. This would be messy since
> you couldn't use VARDATA() anymore.
>
> 2. Forget the bytea header and just treat the object as a GISTENTRY
> array.
>
> Either one of these is going to require changing the picksplit functions
> as well as the calling code, so they're both bad choices from a
> maintenance point of view. I think I lean towards #2 since it will make
> the code less ugly rather than more so.
>
> regards, tom lane
>
>
--
Teodor Sigaev
teodor@stack.net