Re: tsearch2 patch status report

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: tsearch2 patch status report
Date: 2007-08-21 17:03:06
Message-ID: 4404.1187715786@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2007-08-21 17:03:13 Re: tsearch2 patch status report
Previous Message Tom Lane 2007-08-21 16:52:24 A couple of tsearch loose ends