Re: tsearch2() with data from other table

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Marcus Engene <mengpg(at)engene(dot)se>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch2() with data from other table
Date: 2006-11-10 14:15:48
Message-ID: 45548994.1050707@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> CREATE FUNCTION euits(int)
> RETURNS text AS 'select username || \' \' || firstname || \' \' ||
> lastname from site_user where objectid = $1;' LANGUAGE SQL;
>
> CREATE TRIGGER site_item_fts
> BEFORE UPDATE OR INSERT ON site_item
> FOR EACH ROW EXECUTE PROCEDURE
> tsearch2(idxfti, name, keywords, keywords_cb, location_country,
> location_city, media_source, description, euits, site_user);

site_user is a table, isn't it?
tsearch2 trigger accepts only column's names and functions with prototype TEXT
func(TEXT).

For clarify, show your table's definitions.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-11-10 14:19:04 Re: ECPG and multiple threads
Previous Message Albe Laurenz 2006-11-10 14:06:59 Re: "stopping" a single database in a cluster