Search Postgresql Archives

Re: trigger creation error (tsvector_update_trigger)

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

 



dhanunjaya naidu yandrapu <dhanu.techhelp@xxxxxxxxx> 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 (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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