Search Postgresql Archives

tsearch2 headline() query subselect help

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

 



        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/

[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