Skip to content

Commit 7386406

Browse files
author
Alexander Korotkov
committed
Remove some old debug code from the comments.
1 parent 2cdd6d2 commit 7386406

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

src/rumtsquery.c

-58
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,6 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
282282
context->addInfo[index] = PointerGetDatum(addinfo);
283283
context->addInfoIsNull[index] = false;
284284
context->index++;
285-
286-
/*
287-
* ptrEnd = (unsigned char *) VARDATA(addinfo) + VARHDRSZ + 2 *
288-
* Max(level, 1) * MAX_ENCODED_LEN;
289-
*/
290285
}
291286
else
292287
{
@@ -295,25 +290,13 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
295290
VARSIZE(addinfo) + 2 * Max(level, 1) * MAX_ENCODED_LEN);
296291
context->addInfo[index] = PointerGetDatum(addinfo);
297292
ptr = (unsigned char *) VARDATA(addinfo) + VARSIZE_ANY_EXHDR(addinfo);
298-
299-
/*
300-
* ptrEnd = (unsigned char *) VARDATA(addinfo) +
301-
* VARSIZE_ANY_EXHDR(addinfo) + 2 * Max(level, 1) *
302-
* MAX_ENCODED_LEN;
303-
*/
304293
}
305294

306-
/*
307-
* elog(NOTICE, "%s",
308-
* text_to_cstring(DatumGetTextP(context->entries[index])));
309-
*/
310-
311295
while (wrap->parent)
312296
{
313297
QueryItemWrap *parent = wrap->parent;
314298
uint32 sum;
315299

316-
/* elog(NOTICE, "%d %d %d", parent->num, parent->sum, wrap->not); */
317300
encode_varbyte((uint32) parent->num, &ptr);
318301
sum = (uint32) abs(parent->sum);
319302
sum <<= 2;
@@ -329,13 +312,7 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
329312
encode_varbyte(1, &ptr);
330313
encode_varbyte(4 | 1, &ptr);
331314
}
332-
/* Assert(ptr <= ptrEnd); */
333315
SET_VARSIZE(addinfo, ptr - (unsigned char *) addinfo);
334-
335-
/*
336-
* elog(NOTICE, "%s", DatumGetPointer(DirectFunctionCall1(byteaout,
337-
* PointerGetDatum(addinfo))));
338-
*/
339316
}
340317
else if (wrap->type == QI_OPR)
341318
{
@@ -350,21 +327,6 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
350327
}
351328
}
352329

353-
/*PG_FUNCTION_INFO_V1(rum_process_tsquery);
354-
Datum
355-
rum_process_tsquery(PG_FUNCTION_ARGS)
356-
{
357-
TSQuery query = PG_GETARG_TSQUERY(0);
358-
QueryItem *item = GETQUERY(query);
359-
QueryItemWrap *wrap = make_query_item_wrap(item, NULL, false);
360-
int num = 1;
361-
362-
calc_wraps(wrap, &num);
363-
print_wraps(wrap, , 0);
364-
365-
PG_RETURN_VOID();
366-
}*/
367-
368330
PG_FUNCTION_INFO_V1(ruminv_extract_tsquery);
369331
Datum
370332
ruminv_extract_tsquery(PG_FUNCTION_ARGS)
@@ -414,12 +376,6 @@ ruminv_extract_tsquery(PG_FUNCTION_ARGS)
414376
}
415377
*nentries = count;
416378

417-
/* elog(NOTICE, "%d", *nentries);
418-
for (i = 0; i < *nentries; i++)
419-
{
420-
elog(NOTICE, "%s", text_to_cstring(DatumGetPointer((entries)[i])));
421-
}*/
422-
423379
PG_FREE_IF_COPY(query, 0);
424380
PG_RETURN_POINTER(entries);
425381
}
@@ -518,11 +474,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
518474
ptr = (unsigned char *) VARDATA_ANY(DatumGetPointer(addInfo[i]));
519475
size = VARSIZE_ANY_EXHDR(DatumGetPointer(addInfo[i]));
520476

521-
/*
522-
* elog(NOTICE, "%d %s", i,
523-
* DatumGetPointer(DirectFunctionCall1(byteaout, addInfo[i])));
524-
*/
525-
526477
if (size == 0)
527478
{
528479
res = true;
@@ -544,8 +495,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
544495

545496
index = num - 1;
546497

547-
/* elog(NOTICE, "a %d %d %d %d", i, index, sum, not); */
548-
549498
if (child)
550499
{
551500
child->parent = index;
@@ -585,11 +534,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
585534
}
586535
else
587536
{
588-
/*
589-
* for (i = 0; i < lastIndex; i++) { elog(NOTICE, "s %d %d %d %d", i,
590-
* nodes[i].sum, nodes[i].parent, nodes[i].not); }
591-
*/
592-
593537
for (i = lastIndex - 1; i >= 0; i--)
594538
{
595539
if (nodes[i].parent != -2)
@@ -612,8 +556,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
612556
}
613557
}
614558

615-
/* elog(NOTICE, "%d", res);*/
616-
617559
PG_RETURN_BOOL(res);
618560
}
619561

0 commit comments

Comments
 (0)