Re: 8.3 version of ts_headline - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 8.3 version of ts_headline
Date
Msg-id 15756.1189794388@sss.pgh.pa.us
Whole thread Raw
In response to 8.3 version of ts_headline  (Andreas Joseph Krogh <andreak@officenet.no>)
Responses Re: 8.3 version of ts_headline
List pgsql-hackers
Andreas Joseph Krogh <andreak@officenet.no> writes:
> In 8.2 this produces an error:

> SELECT headline('default', 'a b c', 'c'::tsquery,
> 'StartSel=<span class="style1">, StopSel=</span>');
> ERROR:  syntax error
> DETAIL:  Syntax error in position 15.

Sure you don't just need to quote the values?

regression=# SELECT ts_headline('english', 'a b c', 'c'::tsquery,
$$StartSel='<span class="style1">', StopSel='</span>'$$);           ts_headline            
-----------------------------------a b <span class="style1">c</span>
(1 row)

        regards, tom lane


pgsql-hackers by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: 8.3 version of ts_headline
Next
From: Bruce Momjian
Date:
Subject: Re: RETURNING and DO INSTEAD ... Intentional or not?