Unix Technical Forum

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

This is a discussion on Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover within the Pgsql Patches forums, part of the PostgreSQL category; --> This change introduced a compiler warning. Here is a fix for it. | tsrank.c: In function `calc_rank_cd': | tsrank.c:710: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:37 AM
ITAGAKI Takahiro
 
Posts: n/a
Default Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover

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/cvsw...?r1=1.5&r2=1.6)



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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:37 AM
Teodor Sigaev
 
Posts: n/a
Default Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag,it was used only in cover



> 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/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com