Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover

Поиск
Список
Период
Сортировка
Искать

Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover

От:
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Дата:
This change introduced a compiler warning. Here is a fix for it.
| tsrank.c: In function `calc_rank_cd':
| tsrank.c:710: warning: assignment from incompatible pointer type

Index: src/backend/utils/adt/tsrank.c
===================================================================
--- src/backend/utils/adt/tsrank.c	(HEAD)
+++ src/backend/utils/adt/tsrank.c	(working copy)
@@ -707,7 +707,7 @@
 	}
 
 	qr.query = query;
-	qr.operandexist = (int*)palloc0(sizeof(bool) * query->size);
+	qr.operandexist = (bool *) palloc0(sizeof(bool) * query->size);
 
 	doc = get_docrep(txt, &qr, &doclen);
 	if (!doc)


teodor@postgresql.org (Teodor Sigaev) wrote:

> Log Message:
> -----------
> Remove QueryOperand->istrue flag, it was used only in cover ranking
> (ts_rank_cd). Use palloc'ed array in ranking instead of flag.
> 
> Modified Files:
> --------------
>     pgsql/src/backend/utils/adt:
>         tsrank.c (r1.5 -> r1.6)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsrank.c?r1=1.5&r2=1.6)


Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover

От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:


> This change introduced a compiler warning. Here is a fix for it.
>> Remove QueryOperand->istrue flag, it was used only in cover ranking
>> (ts_rank_cd). Use palloc'ed array in ranking instead of flag.
Thank you, committed

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/
FAQ