Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGICU-00066H-Qm for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2013 00:08:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGICU-0002Gz-Ag for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2013 00:08:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGICT-0002Gu-PX for pgsql-bugs@postgresql.org; Fri, 15 Mar 2013 00:08:45 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGICO-0007iF-Om for pgsql-bugs@postgresql.org; Fri, 15 Mar 2013 00:08:45 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.80) (envelope-from ) id 1UGICN-0004Jc-0J for pgsql-bugs@postgresql.org; Fri, 15 Mar 2013 01:08:39 +0100 Date: Fri, 15 Mar 2013 01:08:38 +0100 From: hubert depesz lubaczewski To: pgsql-bugs@postgresql.org Subject: ERROR: syntax error in tsquery - for high-unicode whitespace Message-ID: <20130315000838.GA12142@depesz.com> Reply-To: depesz@depesz.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org hi it was tested on 9.1 and 9.3. Interestingly - it worked without error in 8.2. $ select to_tsquery('english', E'a\xe2\x80\x86a'); ERROR: syntax error in tsquery: "a a" the 3-byte utf8 character is SIX-PER-EM SPACE (based on info from http://www.fileformat.info/info/unicode/char/2006/index.htm) Not sure what should happen with it, but generally I thought that whitespace characters will get ignored (treated as separators) when building tsquery. It seems to work that way when building tsvector though: $ select to_tsvector('english', E'a\xe2\x80\x86a'); to_tsvector ------------- (1 row) and for larger example: $ select to_tsvector('english', E'depesz\xe2\x80\x86whatever'); to_tsvector ----------------------- 'depesz':1 'whatev':2 (1 row) $ select to_tsquery('english', E'depesz\xe2\x80\x86whatever'); ERROR: syntax error in tsquery: "depesz whatever" Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/ -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs