Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAlZH-0007Yy-3C for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Nov 2016 22:35:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cAlZG-0000id-JH for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Nov 2016 22:35:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cAlXr-0007Wt-0G for pgsql-hackers@postgresql.org; Sat, 26 Nov 2016 22:34:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cAlXo-0002qA-8V for pgsql-hackers@postgresql.org; Sat, 26 Nov 2016 22:34:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uAQMXuwO024332; Sat, 26 Nov 2016 17:33:56 -0500 From: Tom Lane To: Oleg Bartunov , Teodor Sigaev cc: Andreas Seltenreich , pgsql-hackers@postgresql.org Subject: Re: [sqlsmith] Failed assertion in TS_phrase_execute In-reply-to: <14732.1480186277@sss.pgh.pa.us> References: <87eg1y2s3x.fsf@credativ.de> <14732.1480186277@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 26 Nov 2016 13:51:17 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24330.1480199636.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 26 Nov 2016 17:33:56 -0500 Message-ID: <24331.1480199636@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: > but I notice that some normalization seems to be getting done by > tsqueryin: > regression=3D# select $$( 'sanct' & 'peter' ) <-> ( 'sanct' & 'peter' )$$= ::tsquery; > tsquery=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20 > -------------------------------------------------------------------------= ------- > ------- > 'sanct' <-> 'sanct' & 'peter' <-> 'sanct' & 'sanct' <-> 'peter' & 'peter= ' <-> ' > peter' > (1 row) BTW, it seems like that normalization is wrong. The transformed query should (and does) match the string "sanct sanct peter sanct sanct peter peter peter", since each of the <-> pairs has a match somewhere in there. But I would expect the original query to be specifying that a match occurs at exactly one place, which of course is unsatisfiable since 'sanct' and 'peter' can't match the same word. regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers