Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 243FB64FD64 for ; Fri, 4 Jul 2008 04:32:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98943-07 for ; Fri, 4 Jul 2008 04:32:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 6B6A0650E93 for ; Fri, 4 Jul 2008 04:32:37 -0300 (ADT) thread-index: AcjdqD4tG/Jv6z/uSo2oqt5TjtpODg== Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 Received: from [80.222.70.18] ([80.222.70.18]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Jul 2008 03:33:24 -0400 Message-ID: <486DD210.9030400@enterprisedb.com> Date: Fri, 04 Jul 2008 10:32:32 +0300 From: "Heikki Linnakangas" Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: "Tom Lane" Cc: =?utf-8?Q?Jan_Urba=C5=84ski?= , "Postgres - Hackers" Subject: Re: gsoc, text search selectivity and dllist enhancments References: <48649261.5040703@students.mimuw.edu.pl> <6233.1215113144@sss.pgh.pa.us> In-Reply-To: <6233.1215113144@sss.pgh.pa.us> Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jul 2008 07:33:24.0656 (UTC) FILETIME=[3E1F9300:01C8DDA8] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/198 X-Sequence-Number: 120458 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