Re: proposal: tsearch dictionary initialization hook

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: proposal: tsearch dictionary initialization hook
Date: 2010-09-28 03:17:52
Message-ID: AANLkTimQXs0nJprxL6SD_YZWENRf+dogYCno=Mu+V9-d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 7, 2010 at 12:55 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2010/9/7 Teodor Sigaev <teodor(at)sigaev(dot)ru>:
>> Hm, what is aim of this hook? It looks like a wrapper of dictionary init
>> method.
>
> If I use a mmap for shared dictionary, then I have to prealloc and
> maybe preread dictionary - it can be done in external module. But I
> have to join preloaded dictionary to requested dictionary. This hook
> allows this relation - and it's general - I don't need any special
> support in ispell dictionary.

Review:

1. Is this really necessary? It seems that you're inserting a hook
here when you could just as well change tmplinit to point to whatever
function you want to call, which wouldn't require a code change.

2. Our standard criteria for the inclusion of a hook is some sample
code that demonstrates how it can be usefully used. I think you need
to provide that before we can consider this further.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2010-09-28 03:26:06 Re: Help with User-defined function in PostgreSQL with Visual C++
Previous Message Robert Haas 2010-09-28 03:12:05 Re: Help with User-defined function in PostgreSQL with Visual C++