Re: 8.3 version of ts_headline

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.3 version of ts_headline
Date: 2007-09-14 18:26:28
Message-ID: 15756.1189794388@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Joseph Krogh <andreak(at)officenet(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-09-14 18:50:58 Re: RETURNING and DO INSTEAD ... Intentional or not?
Previous Message Bruce Momjian 2007-09-14 18:07:30 Re: PL/TCL Patch to prevent postgres from becoming multithreaded