From: | Ryan Fugger <arv(at)ryanfugger(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Problem creating GIN index on multiple weighted columns |
Date: | 2011-08-18 21:21:48 |
Message-ID: | CAG8xytfGx9OHu4gg8-1onVpy6zV_4B1Am7Fh-x56uOeOCvfb_Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm using 8.4.8, attempting to run the following command:
=> create index profile_search_index on profile_profile using
gin(setweight(to_tsvector('english', name), 'A') ||
setweight(to_tsvector('english', description), 'B'));
I get this error:
ERROR: syntax error at or near "||"
LINE 1: ... gin(setweight(to_tsvector('english', name), 'A') || setweig...
^
Is this a bug, or a known limitation, or is my syntax just wrong? The
following works fine:
select setweight(to_tsvector('english', name), 'A') ||
setweight(to_tsvector('english', description), 'B') from
profile_profile;
I would prefer not to store the precomputed tsvector in a separate
column if I can avoid it, although I'll do that if I can't get this to
work. Thanks for any help.
Ryan
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-08-18 21:36:20 | Re: Problem creating GIN index on multiple weighted columns |
Previous Message | Guillaume Lelarge | 2011-08-18 20:48:56 | Re: Pgadmin plugins |