Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0Nsu-0001xr-9i for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Mar 2018 08:53:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0Nsr-0001E4-GB for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Mar 2018 08:53:41 +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.89) (envelope-from ) id 1f0Nsr-0001AH-4n for pgsql-hackers@lists.postgresql.org; Mon, 26 Mar 2018 08:53:41 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0Nqy-0000EB-92 for pgsql-hackers@lists.postgresql.org; Mon, 26 Mar 2018 08:51:50 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id BC08E21C1E26; Mon, 26 Mar 2018 11:51:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from mail.postgrespro.ru (cyclops.l.postgrespro.ru [192.168.27.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 88E5B21C1D3A; Mon, 26 Mar 2018 11:51:42 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1522054302; bh=QhiOzIrRSU8BkOj6QcxL8TOvWFRKmNP7nTKZsafqkKI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=YJXyYJAo68lfR0bHItfUFbeSbeOxLHMUYTbBKD3wZMKYjG6uOpfy+DLaqgZIYlNVn lOkYFyshyiUQeniBNaJ9S1sh1xWxsMXkSNyZGB/ovOmOyjmE78uuwOLgoA1UfvBCLV LTMWBNCjT7vEt0Ijh3fh3tq/wMJlhfJIRc5aRg1A= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 26 Mar 2018 11:51:42 +0300 From: Dmitry Ivanov To: Aleksandr Parfenov Cc: David Steele , Aleksander Alekseev , pgsql-hackers@lists.postgresql.org Subject: Re: new function for tsquery creartion Organization: Postgres Professional In-Reply-To: <20180326092405.71820cf2@asp437-24-g082ur> References: <20180302030605.5ur6ktkb2vyb46pb@alap3.anarazel.de> <152025433949.1548.16466871234054596674.pgcf@coridan.postgresql.org> <34280367-0dab-7f73-8d7c-d21c7276814b@pgmasters.net> <8df9de83119eb295f3424c573d64ff84@postgrespro.ru> <20180326092405.71820cf2@asp437-24-g082ur> Message-ID: X-Sender: d.ivanov@postgrespro.ru User-Agent: Roundcube Webmail/1.2.4 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > Recently I worked with the old version of the patch and found a bug. > So, I think it is better to notify you immediately, so you can fix it > in > rebased/revised version. > > I noticed, that operator AROUND(N) works only > in case of non-negative operands. If any of the operands is negative, > it > behaves as phrase operator . It is caused by lack of TS_NOT_EXAC > flag and AROUND(N) operator check in function TS_phrase_execute in > branches for negated operands. Good to know, thanks! To be honest, I' sure that Theodor is right: it's better to implement AROUND(N) operator using when it's committed. The following version of patch won't support AROUND(N). I have to fix a few more questionable things, though. -- Dmitry Ivanov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company