@@ -282,11 +282,6 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
282282context -> addInfo [index ]= PointerGetDatum (addinfo );
283283context -> addInfoIsNull [index ]= false;
284284context -> index ++ ;
285-
286- /*
287- * ptrEnd = (unsigned char *) VARDATA(addinfo) + VARHDRSZ + 2 *
288- * Max(level, 1) * MAX_ENCODED_LEN;
289- */
290285}
291286else
292287{
@@ -295,25 +290,13 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
295290VARSIZE (addinfo )+ 2 * Max (level ,1 )* MAX_ENCODED_LEN );
296291context -> addInfo [index ]= PointerGetDatum (addinfo );
297292ptr = (unsignedchar * )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-
311295while (wrap -> parent )
312296{
313297QueryItemWrap * parent = wrap -> parent ;
314298uint32 sum ;
315299
316- /* elog(NOTICE, "%d %d %d", parent->num, parent->sum, wrap->not); */
317300encode_varbyte ((uint32 )parent -> num ,& ptr );
318301sum = (uint32 )abs (parent -> sum );
319302sum <<=2 ;
@@ -329,13 +312,7 @@ extract_wraps(QueryItemWrap * wrap, ExtractContext * context, int level)
329312encode_varbyte (1 ,& ptr );
330313encode_varbyte (4 |1 ,& ptr );
331314}
332- /* Assert(ptr <= ptrEnd); */
333315SET_VARSIZE (addinfo ,ptr - (unsignedchar * )addinfo );
334-
335- /*
336- * elog(NOTICE, "%s", DatumGetPointer(DirectFunctionCall1(byteaout,
337- * PointerGetDatum(addinfo))));
338- */
339316}
340317else 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- TSQueryquery = PG_GETARG_TSQUERY(0);
358- QueryItem *item = GETQUERY(query);
359- QueryItemWrap *wrap = make_query_item_wrap(item, NULL, false);
360- intnum = 1;
361-
362- calc_wraps(wrap, &num);
363- print_wraps(wrap, , 0);
364-
365- PG_RETURN_VOID();
366- }*/
367-
368330PG_FUNCTION_INFO_V1 (ruminv_extract_tsquery );
369331Datum
370332ruminv_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-
423379PG_FREE_IF_COPY (query ,0 );
424380PG_RETURN_POINTER (entries );
425381}
@@ -518,11 +474,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
518474ptr = (unsignedchar * )VARDATA_ANY (DatumGetPointer (addInfo [i ]));
519475size = VARSIZE_ANY_EXHDR (DatumGetPointer (addInfo [i ]));
520476
521- /*
522- * elog(NOTICE, "%d %s", i,
523- * DatumGetPointer(DirectFunctionCall1(byteaout, addInfo[i])));
524- */
525-
526477if (size == 0 )
527478{
528479res = true;
@@ -544,8 +495,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
544495
545496index = num - 1 ;
546497
547- /* elog(NOTICE, "a %d %d %d %d", i, index, sum, not); */
548-
549498if (child )
550499{
551500child -> parent = index ;
@@ -585,11 +534,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
585534}
586535else
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-
593537for (i = lastIndex - 1 ;i >=0 ;i -- )
594538{
595539if (nodes [i ].parent != -2 )
@@ -612,8 +556,6 @@ ruminv_tsvector_consistent(PG_FUNCTION_ARGS)
612556}
613557}
614558
615- /*elog(NOTICE, "%d", res);*/
616-
617559PG_RETURN_BOOL (res );
618560}
619561