Commit 33fe7360 authored by Tom Lane's avatar Tom Lane

Re-pgindent tsvector_op.c.

Messed up by recent commits --- this is annoying me while trying to fix
some bugs here.
parent 5ebad9a5
...@@ -1389,9 +1389,9 @@ TS_phrase_execute(QueryItem *curitem, ...@@ -1389,9 +1389,9 @@ TS_phrase_execute(QueryItem *curitem,
return false; return false;
/* /*
* if at least one of the operands has no position information, * if at least one of the operands has no position information, then
* then return false. But if TS_EXEC_PHRASE_AS_AND flag is set then * return false. But if TS_EXEC_PHRASE_AS_AND flag is set then we
* we return true as it is a AND operation * return true as it is a AND operation
*/ */
if (Ldata.npos == 0 || Rdata.npos == 0) if (Ldata.npos == 0 || Rdata.npos == 0)
return (flags & TS_EXEC_PHRASE_AS_AND) ? true : false; return (flags & TS_EXEC_PHRASE_AS_AND) ? true : false;
...@@ -1428,8 +1428,8 @@ TS_phrase_execute(QueryItem *curitem, ...@@ -1428,8 +1428,8 @@ TS_phrase_execute(QueryItem *curitem,
while (Rpos < Rdata.pos + Rdata.npos) while (Rpos < Rdata.pos + Rdata.npos)
{ {
/* /*
* We need to check all possible distances, so reset Lpos * We need to check all possible distances, so reset Lpos to
* to guranteed not yet satisfied position. * guaranteed not yet satisfied position.
*/ */
Lpos = LposStart; Lpos = LposStart;
while (Lpos < Ldata.pos + Ldata.npos) while (Lpos < Ldata.pos + Ldata.npos)
...@@ -1445,8 +1445,8 @@ TS_phrase_execute(QueryItem *curitem, ...@@ -1445,8 +1445,8 @@ TS_phrase_execute(QueryItem *curitem,
pos_iter++; pos_iter++;
/* /*
* Set left start position to next, because current one * Set left start position to next, because current
* could not satisfy distance for any other right * one could not satisfy distance for any other right
* position * position
*/ */
LposStart = Lpos + 1; LposStart = Lpos + 1;
...@@ -1455,8 +1455,8 @@ TS_phrase_execute(QueryItem *curitem, ...@@ -1455,8 +1455,8 @@ TS_phrase_execute(QueryItem *curitem,
else else
{ {
/* /*
* We are in the root of the phrase tree and hence * We are in the root of the phrase tree and hence we
* we don't have to store the resulting positions * don't have to store the resulting positions
*/ */
return true; return true;
} }
...@@ -1464,7 +1464,7 @@ TS_phrase_execute(QueryItem *curitem, ...@@ -1464,7 +1464,7 @@ TS_phrase_execute(QueryItem *curitem,
} }
else if (WEP_GETPOS(*Rpos) <= WEP_GETPOS(*Lpos) || else if (WEP_GETPOS(*Rpos) <= WEP_GETPOS(*Lpos) ||
WEP_GETPOS(*Rpos) - WEP_GETPOS(*Lpos) < WEP_GETPOS(*Rpos) - WEP_GETPOS(*Lpos) <
curitem->qoperator.distance) curitem->qoperator.distance)
{ {
/* /*
* Go to the next Rpos, because Lpos is ahead or on less * Go to the next Rpos, because Lpos is ahead or on less
...@@ -1534,9 +1534,10 @@ TS_execute(QueryItem *curitem, void *checkval, uint32 flags, ...@@ -1534,9 +1534,10 @@ TS_execute(QueryItem *curitem, void *checkval, uint32 flags,
return TS_execute(curitem + 1, checkval, flags, chkcond); return TS_execute(curitem + 1, checkval, flags, chkcond);
case OP_PHRASE: case OP_PHRASE:
/* /*
* do not check TS_EXEC_PHRASE_AS_AND here because chkcond() * do not check TS_EXEC_PHRASE_AS_AND here because chkcond() could
* could do something more if it's called from TS_phrase_execute() * do something more if it's called from TS_phrase_execute()
*/ */
return TS_phrase_execute(curitem, checkval, flags, NULL, chkcond); return TS_phrase_execute(curitem, checkval, flags, NULL, chkcond);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment