phrase search TS_phrase_execute code readability patch
phrase search TS_phrase_execute code readability patch
Hackers,
The attached attempts to make comprehension of the code in "TS_phrase_execute" a bit easier. I posted similar on the "typo patch" thread of July 2nd/5th but my comments there reflected my mis-understanding of the distance operator being exact as opposed to the expected less-than-or-equal.
I had to make one assumption for the attached - that "curitem->qoperator.distance" is always >= 0. In the presence of that assumption the need for the OR goes away.
I don't follow why LposStart is needed so I removed it...
Not compiled or in any way tested...but its not major surgery either - mostly code comments to make following the logic easier.
David J.
Re: phrase search TS_phrase_execute code readability patch
От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Tue, Aug 9, 2016 at 3:35 PM, David G. Johnston wrote: > I don't follow why LposStart is needed so I removed it... That doesn't seem very reasonable. > Not compiled or in any way tested... Please do not bother submitting patches that you aren't prepared to compile and test. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company