@@ -346,11 +346,11 @@ hash_page_items(PG_FUNCTION_ARGS)
346346 MemSet (nulls , 0 , sizeof (nulls ));
347347
348348 j = 0 ;
349- values [j ++ ] = UInt16GetDatum ( uargs -> offset );
349+ values [j ++ ] = Int32GetDatum (( int32 ) uargs -> offset );
350350 values [j ++ ] = PointerGetDatum (& itup -> t_tid );
351351
352352 hashkey = _hash_get_indextuple_hashkey (itup );
353- values [j ] = UInt64GetDatum (( uint64 ) hashkey );
353+ values [j ] = Int64GetDatum (( int64 ) hashkey );
354354
355355 tuple = heap_form_tuple (fctx -> attinmeta -> tupdesc , values , nulls );
356356 result = HeapTupleGetDatum (tuple );
@@ -466,7 +466,7 @@ hash_bitmap_info(PG_FUNCTION_ARGS)
466466 MemSet (nulls , 0 , sizeof (nulls ));
467467
468468 j = 0 ;
469- values [j ++ ] = UInt64GetDatum (( uint64 ) bitmapblkno );
469+ values [j ++ ] = Int64GetDatum (( int64 ) bitmapblkno );
470470 values [j ++ ] = Int32GetDatum (bitmapbit );
471471 values [j ++ ] = BoolGetDatum (bit );
472472
@@ -515,30 +515,30 @@ hash_metapage_info(PG_FUNCTION_ARGS)
515515 MemSet (nulls , 0 , sizeof (nulls ));
516516
517517 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 );
520520 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 );
532532
533533 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 ]);
535535 values [j ++ ] = PointerGetDatum (construct_array (spares ,
536536 HASH_MAX_SPLITPOINTS ,
537537 INT8OID ,
538538 8 , FLOAT8PASSBYVAL , 'd' ));
539539
540540 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 ]);
542542 values [j ++ ] = PointerGetDatum (construct_array (mapp ,
543543 HASH_MAX_BITMAPS ,
544544 INT8OID ,
0 commit comments