Re: pgstattuple extension for indexes - Mailing list pgsql-patches

From Tom Lane
Subject Re: pgstattuple extension for indexes
Date
Msg-id 8453.1157336021@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgstattuple extension for indexes  (Satoshi Nagayasu <nagayasus@nttdata.co.jp>)
List pgsql-patches
Satoshi Nagayasu <nagayasus@nttdata.co.jp> writes:
> Tom Lane wrote:
>> pgstatindex.c: In function 'bt_page_items':
>> pgstatindex.c:564: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'

> I guess my '%d' should be '%zd', right?

No, that sounds even less portable :-(

Given the expected range of IndexTupleSize(), it seems sufficient to
cast its result to int and then use %d formatting.  I've done that
in the latest commit.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgstattuple extension for indexes
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] python / 7.4 / FC5 / x86_64