Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1B2DF1337B5C for ; Fri, 17 Dec 2010 20:13:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 82869-09 for ; Sat, 18 Dec 2010 00:13:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 5F464133616B for ; Fri, 17 Dec 2010 20:13:25 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id oBI0DPxb074512 for ; Sat, 18 Dec 2010 00:13:25 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id oBI0DPfc074511; Sat, 18 Dec 2010 00:13:25 GMT (envelope-from www) Date: Sat, 18 Dec 2010 00:13:25 GMT Message-Id: <201012180013.oBI0DPfc074511@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5793: tsquery error From: "" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201012/128 X-Sequence-Number: 28934 The following bug has been logged online: Bug reference: 5793 Logged by: Email address: ms@instytut.com.pl PostgreSQL version: 8, 9 Operating system: Linux Description: tsquery error Details: The expression 'a & !(c) | a & b' is interpreted as '( a | !c ) & a & b'. select 'a & !(c) | a & b'::tsquery; Subsequent "rewrites" of the same expression give inconsistent results: select '(a & !(c | d)) | (a & b)'::tsquery; -> 'a & !(c | d) | a & b' (correct) select 'a & !(c | d) | a & b'::tsquery; -> '(a | !(c | d)) & a & b' (not correct)