Re: Review: B-Tree emulation for GIN

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: B-Tree emulation for GIN
Date: 2009-03-16 10:08:06
Message-ID: 49BE2506.9020900@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Teodor Sigaev wrote:
>> You might want to declare extra_data as just "void *", instead of an
>> array of pointers. The data type implementation might want to store
>> something there that's not per-key, but applies to the whole query. I
>> see that you're passing it to comparePartial, but that seems to be
>> just future-proofing. What kind of a data type are you envisioning
>> that would
>
> wildspeed module (http://www.sigaev.ru/cvsweb/cvsweb.cgi/wildspeed/) -
> for each key from it's needed to store some info. Right now it's coded
> directly in Datum, but it looks ugly (at least for me).

Ok, I guess it's best to leave it as you had in the patch then.

>> make use of it? It seems that you could pass the same information in
>> the partial key Datum itself that extractQuery returns. You're
>> currently using it as a way to avoid some palloc's in
>> gin_tsquery_consistent(). That seems like a pretty dirty hack. I doubt
>> there's any meaningful performance advantage from that, but if there
>> is, I think you could use a statically allocated array instead.
>
> It's easy to un-dirty that hack, but before I'd like to see your
> comments about thoughts above.

Yeah, please revert that hack.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-03-16 12:40:11 Re: How to implement an auto-increment column for a system catalog table?
Previous Message Nikhil Sontakke 2009-03-16 09:07:11 cross-compiling plpython