| From: | "John Smith" <jayzee(dot)smith(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | tsearch2 headline() query subselect help |
| Date: | 2007-01-11 00:14:44 |
| Message-ID: | f029597e0701101614q1d68e19cl73be5dbd9cd787d6@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
guys,
how'd i make this query work?
select headline(select column_1 from table_1 where
to_tsvector(column_1) @@ to_tsquery('ftp'),'ftp'::tsquery);
ERROR: syntax error at or near "select" at character 17
when i break it, it works fine, like so
# select headline('ftp sftp','ftp'::tsquery);
headline
----------
<b>ftp</b> sftp
(1 row)
# select column_1 from table_1 where to_tsvector(column_1) @@
to_tsquery('ftp');
column_1
----------
ftp sftp
(1 row)
where
# select column_1 from table_1 where column_index=1;
column_1
----------
ftp sftp
(1 row)
and how'd i add rank() to this query?
jzs
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Lanczos | 2007-01-11 00:32:19 | Moving the database from winxp to linux |
| Previous Message | Richard Broersma Jr | 2007-01-11 00:14:07 | Re: Problems With VIEWS |