Re: ERROR: syntax error in tsquery - for high-unicode whitespace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: ERROR: syntax error in tsquery - for high-unicode whitespace
Date: 2013-03-15 03:56:19
Message-ID: 20977.1363319779@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
> $ select to_tsquery('english', E'a\xe2\x80\x86a');
> ERROR: syntax error in tsquery: "aa"

> the 3-byte utf8 character is SIX-PER-EM SPACE (based on info from
> http://www.fileformat.info/info/unicode/char/2006/index.htm)

AFAICS, that behavior is correct, if you're using a locale that reports
as being whitespace. Compare

u8e=# select to_tsquery('english', E'a a');
ERROR: syntax error in tsquery: "a a"

You need an ampersand or something in there.
Or use plainto_tsquery().

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rikard Pavelic 2013-03-15 07:52:52 Re: BUG #7943: plpgsql parsing bug
Previous Message Tom Lane 2013-03-15 03:49:01 Re: BUG #7943: plpgsql parsing bug