Re: pgsql: Phrase full text search. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Phrase full text search.
Date
Msg-id 11272.1460123329@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Phrase full text search.  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: pgsql: Phrase full text search.
List pgsql-committers
Teodor Sigaev <teodor@sigaev.ru> 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


pgsql-committers by date:

Previous
From: Teodor Sigaev
Date:
Subject: pgsql: Rename comparePos() to compareWordEntryPos()
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Use quicksort, not replacement selection, for external sorting.