Monday, 2 September 2013

PGSQL query confusion with to_tsvector and setweight methods

PGSQL query confusion with to_tsvector and setweight methods

Can anybody please explain me this insert command ? i am confused with
setweight(to_tsvector(x,x)) part. This is used inside a trigger creation
script.
INSERT INTO text_search_actvities (ref_id, column_name, keywords,
contact_id) VALUES (new.id, 'name', setweight(to_tsvector('simple',
new.name), 'A'), new.id);

No comments:

Post a Comment