On Tue, 11 Jul 2006, Lars Haugseth wrote:
> I have a trigger to automatically set a ts_vector column on inserts or
> updates, like this:
>
> CREATE TRIGGER jobs_ts_trg BEFORE UPDATE OR INSERT ON jobs
> FOR EACH ROW EXECUTE PROCEDURE tsearch2(ts, ftxt);
>
> How can I specify which tsearch2 config to use by this trigger function? It
> seems to always use the default one for my locale, which is not what I need
> for this particular table/column.
not tested: write wrapper function my_tsearch2(ts_name, ts, ftxt) which
first calls 'set_curcfg(ts_name)'
>
> Regards,
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@..., http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
|