dhanunjaya naidu yandrapu <[email protected]> writes:
> I am getting the following error while creating a trigger
> jistest=> CREATE TRIGGER resumes_tsv_update_title_tsvector BEFORE INSERT OR
> UPDATE ON resumes FOR EACH ROW EXECUTE PROCEDURE
> tsvector_update_trigger(title_tsvector, 'pg_catalog.english', title);
> ERROR: syntax error at or near "."
> LINE 1: ...svector_update_trigger(title_tsvector, 'pg_catalog.english',...
hmm, it works here. Are you sure you copied the command correctly?
regression=# create table resumes(title text, title_tsvector tsvector);
CREATE TABLE
regression=# CREATE TRIGGER resumes_tsv_update_title_tsvector BEFORE INSERT OR
regression-# UPDATE ON resumes FOR EACH ROW EXECUTE PROCEDURE
regression-# tsvector_update_trigger(title_tsvector, 'pg_catalog.english',
title);
CREATE TRIGGER
regression=# insert into resumes values('the foo bar');
INSERT 0 1
regression=# select * from resumes;
title | title_tsvector
-------------+-----------------
the foo bar | 'bar':3 'foo':2
(1 row)
regards, tom lane
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general