tsearch2 trigger

From: Joel Leyh <hashbang(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch2 trigger
Date: 2005-04-21 17:27:48
Message-ID: 7671eb7050421102712078e06@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am writing a tsearch2 trigger function in plperl. I would like to
run a query similar to this:

setweight(to_tsvector(col1),'b') || setweight(to_tsvector(col2),'a')

and insert the result into the tsvector column. I know I can call
spi_exec_query('select ...') and insert the result, but is this the
best way of doing it? I need the trigger to be plperl since there is
some additional foo I am doing.
Thanks! --Joel

Browse pgsql-general by date

  From Date Subject
Next Message Steve - DND 2005-04-21 17:51:05 Get timestamp as UTC
Previous Message "pgsql-general 2005-04-21 16:58:05 Re: Finding cardinality of an index