@@ -282,11 +282,6 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
282
282
context -> addInfo [index ] = PointerGetDatum (addinfo );
283
283
context -> addInfoIsNull [index ] = false;
284
284
context -> index ++ ;
285
-
286
- /*
287
- * ptrEnd = (unsigned char *) VARDATA(addinfo) + VARHDRSZ + 2 *
288
- * Max(level, 1) * MAX_ENCODED_LEN;
289
- */
290
285
}
291
286
else
292
287
{
@@ -295,25 +290,13 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
295
290
VARSIZE (addinfo ) + 2 * Max (level , 1 ) * MAX_ENCODED_LEN );
296
291
context -> addInfo [index ] = PointerGetDatum (addinfo );
297
292
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
- */
304
293
}
305
294
306
- /*
307
- * elog(NOTICE, "%s",
308
- * text_to_cstring(DatumGetTextP(context->entries[index])));
309
- */
310
-
311
295
while (wrap -> parent )
312
296
{
313
297
QueryItemWrap * parent = wrap -> parent ;
314
298
uint32 sum ;
315
299
316
- /* elog(NOTICE, "%d %d %d", parent->num, parent->sum, wrap->not); */
317
300
encode_varbyte ((uint32 ) parent -> num , & ptr );
318
301
sum = (uint32 ) abs (parent -> sum );
319
302
sum <<= 2 ;
@@ -329,13 +312,7 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
329
312
encode_varbyte (1 , & ptr );
330
313
encode_varbyte (4 | 1 , & ptr );
331
314
}
332
- /* Assert(ptr <= ptrEnd); */
333
315
SET_VARSIZE (addinfo , ptr - (unsigned char * ) addinfo );
334
-
335
- /*
336
- * elog(NOTICE, "%s", DatumGetPointer(DirectFunctionCall1(byteaout,
337
- * PointerGetDatum(addinfo))));
338
- */
339
316
}
340
317
else if (wrap -> type == QI_OPR )
341
318
{
@@ -350,21 +327,6 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
350
327
}
351
328
}
352
329
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
-
368
330
PG_FUNCTION_INFO_V1 (ruminv_extract_tsquery );
369
331
Datum
370
332
ruminv_extract_tsquery (PG_FUNCTION_ARGS )
@@ -414,12 +376,6 @@ ruminv_extract_tsquery(PG_FUNCTION_ARGS)
414
376
}
415
377
* nentries = count ;
416
378
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
-
423
379
PG_FREE_IF_COPY (query , 0 );
424
380
PG_RETURN_POINTER (entries );
425
381
}
@@ -518,11 +474,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
518
474
ptr = (unsigned char * ) VARDATA_ANY (DatumGetPointer (addInfo [i ]));
519
475
size = VARSIZE_ANY_EXHDR (DatumGetPointer (addInfo [i ]));
520
476
521
- /*
522
- * elog(NOTICE, "%d %s", i,
523
- * DatumGetPointer(DirectFunctionCall1(byteaout, addInfo[i])));
524
- */
525
-
526
477
if (size == 0 )
527
478
{
528
479
res = true;
@@ -544,8 +495,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
544
495
545
496
index = num - 1 ;
546
497
547
- /* elog(NOTICE, "a %d %d %d %d", i, index, sum, not); */
548
-
549
498
if (child )
550
499
{
551
500
child -> parent = index ;
@@ -585,11 +534,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
585
534
}
586
535
else
587
536
{
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
-
593
537
for (i = lastIndex - 1 ; i >= 0 ; i -- )
594
538
{
595
539
if (nodes [i ].parent != -2 )
@@ -612,8 +556,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
612
556
}
613
557
}
614
558
615
- /* elog(NOTICE, "%d", res);*/
616
-
617
559
PG_RETURN_BOOL (res );
618
560
}
619
561
0 commit comments