Re: gsoc, text search selectivity and dllist enhancments - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: gsoc, text search selectivity and dllist enhancments
Date
Msg-id 486DD210.9030400@enterprisedb.com
Whole thread Raw
In response to Re: gsoc, text search selectivity and dllist enhancments  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: gsoc, text search selectivity and dllist enhancments  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> The data structure I'd suggest is a simple array of pointers
> to the underlying hash table entries.  Since you have a predetermined
> maximum number of lexemes to track, you can just palloc the array once
> --- you don't need the expansibility properties of a list. 

The number of lexemes isn't predetermined. It's 2 * (longest tsvector 
seen so far), and we don't know beforehand how long the longest tsvector is.

repalloc()ing shouldn't be a problem, though.

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


pgsql-hackers by date:

Previous
From: Tom Raney
Date:
Subject: Re: [PATCHES] Explain XML patch v2
Next
From: Gregory Stark
Date:
Subject: Re: the un-vacuumable table