Re: trigger creation error (tsvector_update_trigger)
| От | Tom Lane |
|---|---|
| Тема | Re: trigger creation error (tsvector_update_trigger) |
| Дата | |
| Msg-id | 2973.1234629369@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | trigger creation error (tsvector_update_trigger) (dhanunjaya naidu yandrapu <dhanu.techhelp@gmail.com>) |
| Список | pgsql-general |
dhanunjaya naidu yandrapu <dhanu.techhelp@gmail.com> 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
В списке pgsql-general по дате отправления: