Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoWmZ-00057m-MV for pgsql-committers@arkaria.postgresql.org; Fri, 08 Apr 2016 13:49:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aoWmZ-00086h-9T for pgsql-committers@arkaria.postgresql.org; Fri, 08 Apr 2016 13:49:07 +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 1aoWmM-0007t2-R1 for pgsql-committers@postgresql.org; Fri, 08 Apr 2016 13:48:54 +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 1aoWmJ-0007y3-Jc for pgsql-committers@postgresql.org; Fri, 08 Apr 2016 13:48:54 +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 u38DmnrI011273; Fri, 8 Apr 2016 09:48:49 -0400 From: Tom Lane To: Teodor Sigaev cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Phrase full text search. In-reply-to: <570772C6.4060808@sigaev.ru> References: <22516.1460081958@sss.pgh.pa.us> <570772C6.4060808@sigaev.ru> Comments: In-reply-to Teodor Sigaev message dated "Fri, 08 Apr 2016 11:58:46 +0300" Date: Fri, 08 Apr 2016 09:48:49 -0400 Message-ID: <11272.1460123329@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Teodor Sigaev writes: >> Hasn't this patch broken on-disk compatibility of type tsquery by >> renumbering the values of QueryOperator.operator? I'm looking at >> the patch delta in ts_type.h. > Distance field is placed exactly in hole between two uint8_t fields and uint32_t > field, as I known any known platform which we support uses 4-byte aligment for > int32 type. Am I wrong? No, I'm worried about the fact that you changed the OP_xxx constants. Won't that cause a pre-existing tsquery operator to be read incorrectly? Assuming that I'm right, you need to revert OP_AND/OP_OR/OP_NOT to what they were before, which means you need to give up on the assumption that the numerical values of the OP_xxx constants correspond directly to their syntactic priority. But that assumption was never going to survive the next tsquery expansion anyway. I'd suggest a static const array mapping the OP values into their syntactic priorities. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers