Re: tsearch2 patch status report - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tsearch2 patch status report
Date
Msg-id 4404.1187715786@sss.pgh.pa.us
Whole thread Raw
In response to Re: tsearch2 patch status report  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: tsearch2 patch status report  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> I'm skimming through tsearch code, trying to understand it. I'd like to
> see more comments, at least function-comments explaining what each
> function does, what the arguments are etc. I can try to add them as I go
> as well, and send a patch.

Yes, the patch is not well commented.  I improved matters in the
interface code that I worked over (eg tsearchcmds.c), but ran out of
patience for trying to comment the "guts" code.  Please send a patch
for any improvements you make.

> The memory management of the init functions looks weird. In spell.c,
> there's this piece of code:

I saw that and didn't care for it much, but didn't look into exactly
what would be needed to get rid of it.  (I did clean up another place
that had a *global* magic context pointer ... that looked like trouble
waiting to happen.)  If you make the outside caller create the context,
does it need to be passed explicitly or can it just be
CurrentMemoryContext when they are called?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: A couple of tsearch loose ends
Next
From: Heikki Linnakangas
Date:
Subject: Re: tsearch2 patch status report