Charley:
thanks for the reply, I have already tried this.
I have something like this:
CREATE TABLE tsearch_index ( i serial PRIMARY key);
CREATE TABLE book (book_id serial PRIMARY KEY, title varchar(100));
ALTER TABLE tsearch_index ADD COLUMN idxFTI tsvector;
INSERT INTO book (title) VALUES ('Duck Tales');
INSERT INTO book (title) VALUES ('Jungle Book');
When I run your query:
test=# UPDATE tsearch_index SET idxFTI=to_tsvector('default',coalesce(SELECT
test(# title FROM book,''));
ERROR: syntax error at or near "SELECT" at character 64
LINE 1: ...earch_index SET idxFTI=to_tsvector('default',coalesce(SELECT
Any other suggestions?
On 12/22/05, Charley Tiggs <ctiggs@xpressdocs.com> wrote:
>
> On Dec 22, 2005, at 9:28 AM, Mag Gam wrote:
>
> > Trying this post again, since I can't post on pgsql-general....
> >
> > Is it possible to store an index in a different table? Instead of
> > keeping the index in a separate column, I have a separate table for
> > storing all indexes. I am trying to set up something like this:
> >
> > UPDATE indexTable SET index1=to_tsvector('default',coalesce
> > (Table1.Data,''));
> >
> > This is currently not working, but something in this line. Is this
> > possible? Does tsearch2 only restrict to 1 table?
>
> I believe you have to select the data from Table1.
>
> UPDATE indexTable SET index1=to_tsvector('default',coalesce(SELECT
> data FROM table1,''));
>
> Charley
>