Re: Tsearch2 trigger firing...

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Net Virtual Mailing Lists <mailinglists(at)net-virtual(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tsearch2 trigger firing...
Date: 2004-10-15 09:57:08
Message-ID: Pine.GSO.4.61.0410151352040.11060@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 15 Oct 2004, Net Virtual Mailing Lists wrote:

> Hello,
>
> I have a table that uses tsearch2 and, of course, and index and trigger
> to keep everything updated..... Something like:
>
> CREATE TABLE sometable (
> id SERIAL,
> someinteger INTEGER
> sometext TEXT,
> sometext2 TEXT,
> sometext3 TEXT,
> sometext_fti TSVECTOR
> );
>
> There are two issues:
>
> #1. I need a way to be able to do a full-text search any combination of
> sometext, sometext2, and sometext3... So far the only way I've been able
>
>
> .. is there some way to get the best of both worlds here or am I trying
> to jam a square peg into a round hole?...

Hmm, probably :)
There is a hint on http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_Notes
under section "Restricted search".

>
> #2. When doing an update on the above table, such as: "UPDATE sometable
> SET someinteger=0", it ends up firing off the triggers which of course
> takes a long time to update... Is there someway to make the trigger only
> fire if a the field it is tied to is updated?.... This is not a
>

no idea, sorry

> Thanks as always!
>
>
> - Greg
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-10-15 10:23:06 Re: Mathematical operations with NULL values
Previous Message Martijn van Oosterhout 2004-10-15 09:43:35 Re: 'NOW' in UTC with no timezone