@@ -1400,8 +1400,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
1400
1400
show_instrumentation_count ("Rows Removed by Filter" , 1 ,
1401
1401
planstate , es );
1402
1402
if (es -> analyze )
1403
- ExplainPropertyLong ("Heap Fetches" ,
1404
- ((IndexOnlyScanState * ) planstate )-> ioss_HeapFetches , es );
1403
+ ExplainPropertyInteger ("Heap Fetches" ,
1404
+ ((IndexOnlyScanState * ) planstate )-> ioss_HeapFetches ,
1405
+ es );
1405
1406
break ;
1406
1407
case T_BitmapIndexScan :
1407
1408
show_scan_qual (((BitmapIndexScan * ) plan )-> indexqualorig ,
@@ -2325,7 +2326,7 @@ show_sort_info(SortState *sortstate, ExplainState *es)
2325
2326
else
2326
2327
{
2327
2328
ExplainPropertyText ("Sort Method" , sortMethod , es );
2328
- ExplainPropertyLong ("Sort Space Used" , spaceUsed , es );
2329
+ ExplainPropertyInteger ("Sort Space Used" , spaceUsed , es );
2329
2330
ExplainPropertyText ("Sort Space Type" , spaceType , es );
2330
2331
}
2331
2332
}
@@ -2366,7 +2367,7 @@ show_sort_info(SortState *sortstate, ExplainState *es)
2366
2367
ExplainOpenGroup ("Worker" , NULL , true, es );
2367
2368
ExplainPropertyInteger ("Worker Number" , n , es );
2368
2369
ExplainPropertyText ("Sort Method" , sortMethod , es );
2369
- ExplainPropertyLong ("Sort Space Used" , spaceUsed , es );
2370
+ ExplainPropertyInteger ("Sort Space Used" , spaceUsed , es );
2370
2371
ExplainPropertyText ("Sort Space Type" , spaceType , es );
2371
2372
ExplainCloseGroup ("Worker" , NULL , true, es );
2372
2373
}
@@ -2445,13 +2446,13 @@ show_hash_info(HashState *hashstate, ExplainState *es)
2445
2446
2446
2447
if (es -> format != EXPLAIN_FORMAT_TEXT )
2447
2448
{
2448
- ExplainPropertyLong ("Hash Buckets" , hinstrument .nbuckets , es );
2449
- ExplainPropertyLong ("Original Hash Buckets" ,
2449
+ ExplainPropertyInteger ("Hash Buckets" , hinstrument .nbuckets , es );
2450
+ ExplainPropertyInteger ("Original Hash Buckets" ,
2450
2451
hinstrument .nbuckets_original , es );
2451
- ExplainPropertyLong ("Hash Batches" , hinstrument .nbatch , es );
2452
- ExplainPropertyLong ("Original Hash Batches" ,
2452
+ ExplainPropertyInteger ("Hash Batches" , hinstrument .nbatch , es );
2453
+ ExplainPropertyInteger ("Original Hash Batches" ,
2453
2454
hinstrument .nbatch_original , es );
2454
- ExplainPropertyLong ("Peak Memory Usage" , spacePeakKb , es );
2455
+ ExplainPropertyInteger ("Peak Memory Usage" , spacePeakKb , es );
2455
2456
}
2456
2457
else if (hinstrument .nbatch_original != hinstrument .nbatch ||
2457
2458
hinstrument .nbuckets_original != hinstrument .nbuckets )
@@ -2484,8 +2485,10 @@ show_tidbitmap_info(BitmapHeapScanState *planstate, ExplainState *es)
2484
2485
{
2485
2486
if (es -> format != EXPLAIN_FORMAT_TEXT )
2486
2487
{
2487
- ExplainPropertyLong ("Exact Heap Blocks" , planstate -> exact_pages , es );
2488
- ExplainPropertyLong ("Lossy Heap Blocks" , planstate -> lossy_pages , es );
2488
+ ExplainPropertyInteger ("Exact Heap Blocks" ,
2489
+ planstate -> exact_pages , es );
2490
+ ExplainPropertyInteger ("Lossy Heap Blocks" ,
2491
+ planstate -> lossy_pages , es );
2489
2492
}
2490
2493
else
2491
2494
{
@@ -2695,16 +2698,26 @@ show_buffer_usage(ExplainState *es, const BufferUsage *usage)
2695
2698
}
2696
2699
else
2697
2700
{
2698
- ExplainPropertyLong ("Shared Hit Blocks" , usage -> shared_blks_hit , es );
2699
- ExplainPropertyLong ("Shared Read Blocks" , usage -> shared_blks_read , es );
2700
- ExplainPropertyLong ("Shared Dirtied Blocks" , usage -> shared_blks_dirtied , es );
2701
- ExplainPropertyLong ("Shared Written Blocks" , usage -> shared_blks_written , es );
2702
- ExplainPropertyLong ("Local Hit Blocks" , usage -> local_blks_hit , es );
2703
- ExplainPropertyLong ("Local Read Blocks" , usage -> local_blks_read , es );
2704
- ExplainPropertyLong ("Local Dirtied Blocks" , usage -> local_blks_dirtied , es );
2705
- ExplainPropertyLong ("Local Written Blocks" , usage -> local_blks_written , es );
2706
- ExplainPropertyLong ("Temp Read Blocks" , usage -> temp_blks_read , es );
2707
- ExplainPropertyLong ("Temp Written Blocks" , usage -> temp_blks_written , es );
2701
+ ExplainPropertyInteger ("Shared Hit Blocks" ,
2702
+ usage -> shared_blks_hit , es );
2703
+ ExplainPropertyInteger ("Shared Read Blocks" ,
2704
+ usage -> shared_blks_read , es );
2705
+ ExplainPropertyInteger ("Shared Dirtied Blocks" ,
2706
+ usage -> shared_blks_dirtied , es );
2707
+ ExplainPropertyInteger ("Shared Written Blocks" ,
2708
+ usage -> shared_blks_written , es );
2709
+ ExplainPropertyInteger ("Local Hit Blocks" ,
2710
+ usage -> local_blks_hit , es );
2711
+ ExplainPropertyInteger ("Local Read Blocks" ,
2712
+ usage -> local_blks_read , es );
2713
+ ExplainPropertyInteger ("Local Dirtied Blocks" ,
2714
+ usage -> local_blks_dirtied , es );
2715
+ ExplainPropertyInteger ("Local Written Blocks" ,
2716
+ usage -> local_blks_written , es );
2717
+ ExplainPropertyInteger ("Temp Read Blocks" ,
2718
+ usage -> temp_blks_read , es );
2719
+ ExplainPropertyInteger ("Temp Written Blocks" ,
2720
+ usage -> temp_blks_written , es );
2708
2721
if (track_io_timing )
2709
2722
{
2710
2723
ExplainPropertyFloat ("I/O Read Time" , INSTR_TIME_GET_MILLISEC (usage -> blk_read_time ), 3 , es );
@@ -3309,23 +3322,11 @@ ExplainPropertyText(const char *qlabel, const char *value, ExplainState *es)
3309
3322
* Explain an integer-valued property.
3310
3323
*/
3311
3324
void
3312
- ExplainPropertyInteger (const char * qlabel , int value , ExplainState * es )
3325
+ ExplainPropertyInteger (const char * qlabel , int64 value , ExplainState * es )
3313
3326
{
3314
3327
char buf [32 ];
3315
3328
3316
- snprintf (buf , sizeof (buf ), "%d" , value );
3317
- ExplainProperty (qlabel , buf , true, es );
3318
- }
3319
-
3320
- /*
3321
- * Explain a long-integer-valued property.
3322
- */
3323
- void
3324
- ExplainPropertyLong (const char * qlabel , long value , ExplainState * es )
3325
- {
3326
- char buf [32 ];
3327
-
3328
- snprintf (buf , sizeof (buf ), "%ld" , value );
3329
+ snprintf (buf , sizeof (buf ), INT64_FORMAT , value );
3329
3330
ExplainProperty (qlabel , buf , true, es );
3330
3331
}
3331
3332
0 commit comments