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

From Satoshi Nagayasu
Subject Re: pgstattuple extension for indexes
Date
Msg-id 44FB646B.8030808@nttdata.co.jp
Whole thread Raw
In response to Re: pgstattuple extension for indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgstattuple extension for indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing-g -fpic -I. -I../../src/include -D_GNU_SOURCE   -c -o pgstatindex.o pgstatindex.c 
> pgstatindex.c: In function 'bt_page_items':
> pgstatindex.c:564: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
> 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?
--
NAGAYASU Satoshi <nagayasus@nttdata.co.jp>
Phone: +81-3-3523-8122
*** pgstatindex.c    2006-09-03 02:05:29.000000000 +0900
--- pgstatindex.c.new    2006-09-04 08:22:42.000000000 +0900
***************
*** 561,567 ****
              values[j] = palloc(32);
              snprintf(values[j++], 32, "(%u,%u)", blkno, itup->t_tid.ip_posid);
              values[j] = palloc(32);
!             snprintf(values[j++], 32, "%d", IndexTupleSize(itup));
              values[j] = palloc(32);
              snprintf(values[j++], 32, "%c", IndexTupleHasNulls(itup) ? 't' : 'f');
              values[j] = palloc(32);
--- 561,567 ----
              values[j] = palloc(32);
              snprintf(values[j++], 32, "(%u,%u)", blkno, itup->t_tid.ip_posid);
              values[j] = palloc(32);
!             snprintf(values[j++], 32, "%zd", IndexTupleSize(itup));
              values[j] = palloc(32);
              snprintf(values[j++], 32, "%c", IndexTupleHasNulls(itup) ? 't' : 'f');
              values[j] = palloc(32);

pgsql-patches by date:

Previous
From: Satoshi Nagayasu
Date:
Subject: Re: pgstattuple extension for indexes
Next
From: Michael Glaesemann
Date:
Subject: Re: Interval month, week -> day