Search Postgresql Archives

Re: tsearch2() with data from other table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
                                                   WWW: http://www.sigaev.ru/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux