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