Search Postgresql Archives

Re: tsearch2 headline() query subselect help

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

 



On Wed, 2007-01-10 at 19:14 -0500, John Smith wrote:
>         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
>         

After taking a closer look, why don't you just write it simply like:

select headline(column_1,'ftp'::tsquery) from table_1 where to_tsvector
(column_1) @@ to_tsquery('ftp');

If you do it as a subquery, the subquery can't return multiple values,
and it looks like you expect it to.

	Jeff Davis



[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