@@ -346,11 +346,11 @@ hash_page_items(PG_FUNCTION_ARGS)
346
346
MemSet (nulls , 0 , sizeof (nulls ));
347
347
348
348
j = 0 ;
349
- values [j ++ ] = UInt16GetDatum ( uargs -> offset );
349
+ values [j ++ ] = Int32GetDatum (( int32 ) uargs -> offset );
350
350
values [j ++ ] = PointerGetDatum (& itup -> t_tid );
351
351
352
352
hashkey = _hash_get_indextuple_hashkey (itup );
353
- values [j ] = UInt64GetDatum (( uint64 ) hashkey );
353
+ values [j ] = Int64GetDatum (( int64 ) hashkey );
354
354
355
355
tuple = heap_form_tuple (fctx -> attinmeta -> tupdesc , values , nulls );
356
356
result = HeapTupleGetDatum (tuple );
@@ -466,7 +466,7 @@ hash_bitmap_info(PG_FUNCTION_ARGS)
466
466
MemSet (nulls , 0 , sizeof (nulls ));
467
467
468
468
j = 0 ;
469
- values [j ++ ] = UInt64GetDatum (( uint64 ) bitmapblkno );
469
+ values [j ++ ] = Int64GetDatum (( int64 ) bitmapblkno );
470
470
values [j ++ ] = Int32GetDatum (bitmapbit );
471
471
values [j ++ ] = BoolGetDatum (bit );
472
472
@@ -515,30 +515,30 @@ hash_metapage_info(PG_FUNCTION_ARGS)
515
515
MemSet (nulls , 0 , sizeof (nulls ));
516
516
517
517
j = 0 ;
518
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_magic );
519
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_version );
518
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_magic );
519
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_version );
520
520
values [j ++ ] = Float8GetDatum (metad -> hashm_ntuples );
521
- values [j ++ ] = UInt32GetDatum ( metad -> hashm_ffactor );
522
- values [j ++ ] = UInt32GetDatum ( metad -> hashm_bsize );
523
- values [j ++ ] = UInt32GetDatum ( metad -> hashm_bmsize );
524
- values [j ++ ] = UInt32GetDatum ( metad -> hashm_bmshift );
525
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_maxbucket );
526
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_highmask );
527
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_lowmask );
528
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_ovflpoint );
529
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_firstfree );
530
- values [j ++ ] = UInt64GetDatum ( metad -> hashm_nmaps );
531
- values [j ++ ] = UInt32GetDatum ( metad -> hashm_procid );
521
+ values [j ++ ] = Int32GetDatum (( int32 ) metad -> hashm_ffactor );
522
+ values [j ++ ] = Int32GetDatum (( int32 ) metad -> hashm_bsize );
523
+ values [j ++ ] = Int32GetDatum (( int32 ) metad -> hashm_bmsize );
524
+ values [j ++ ] = Int32GetDatum (( int32 ) metad -> hashm_bmshift );
525
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_maxbucket );
526
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_highmask );
527
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_lowmask );
528
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_ovflpoint );
529
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_firstfree );
530
+ values [j ++ ] = Int64GetDatum (( int64 ) metad -> hashm_nmaps );
531
+ values [j ++ ] = ObjectIdGetDatum (( Oid ) metad -> hashm_procid );
532
532
533
533
for (i = 0 ; i < HASH_MAX_SPLITPOINTS ; i ++ )
534
- spares [i ] = UInt64GetDatum ( metad -> hashm_spares [i ]);
534
+ spares [i ] = Int64GetDatum (( int8 ) metad -> hashm_spares [i ]);
535
535
values [j ++ ] = PointerGetDatum (construct_array (spares ,
536
536
HASH_MAX_SPLITPOINTS ,
537
537
INT8OID ,
538
538
8 , FLOAT8PASSBYVAL , 'd' ));
539
539
540
540
for (i = 0 ; i < HASH_MAX_BITMAPS ; i ++ )
541
- mapp [i ] = UInt64GetDatum ( metad -> hashm_mapp [i ]);
541
+ mapp [i ] = Int64GetDatum (( int64 ) metad -> hashm_mapp [i ]);
542
542
values [j ++ ] = PointerGetDatum (construct_array (mapp ,
543
543
HASH_MAX_BITMAPS ,
544
544
INT8OID ,
0 commit comments