tsearch2 headline() query subselect help - Mailing list pgsql-general

From John Smith
Subject tsearch2 headline() query subselect help
Date
Msg-id f029597e0701101614q1d68e19cl73be5dbd9cd787d6@mail.gmail.com
Whole thread Raw
Responses Re: tsearch2 headline() query subselect help  (Jeff Davis <pgsql@j-davis.com>)
Re: tsearch2 headline() query subselect help  (Jeff Davis <pgsql@j-davis.com>)
List 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/

pgsql-general by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: Problems With VIEWS
Next
From: "Tomas Lanczos"
Date:
Subject: Moving the database from winxp to linux