@@ -73,10 +73,8 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
7373	{
7474		ereport (ERROR ,
7575				(errcode (ERRCODE_PROGRAM_LIMIT_EXCEEDED ),
76- 			errmsg ("index row size %lu exceeds maximum %lu for index \"%s\"" ,
77- 				   (unsigned long ) newsz ,
78- 				   (unsigned long ) BrinMaxItemSize ,
79- 				   RelationGetRelationName (idxrel ))));
76+ 			errmsg ("index row size %zu exceeds maximum %zu for index \"%s\"" ,
77+ 				   newsz , BrinMaxItemSize , RelationGetRelationName (idxrel ))));
8078		return  false;			/* keep compiler quiet */ 
8179	}
8280
@@ -357,10 +355,8 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
357355	{
358356		ereport (ERROR ,
359357				(errcode (ERRCODE_PROGRAM_LIMIT_EXCEEDED ),
360- 			errmsg ("index row size %lu exceeds maximum %lu for index \"%s\"" ,
361- 				   (unsigned long ) itemsz ,
362- 				   (unsigned long ) BrinMaxItemSize ,
363- 				   RelationGetRelationName (idxrel ))));
358+ 			errmsg ("index row size %zu exceeds maximum %zu for index \"%s\"" ,
359+ 				   itemsz , BrinMaxItemSize , RelationGetRelationName (idxrel ))));
364360		return  InvalidOffsetNumber ;		/* keep compiler quiet */ 
365361	}
366362
@@ -669,7 +665,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
669665	BlockNumber  oldblk ;
670666	BlockNumber  newblk ;
671667	Page 		page ;
672- 	int 	 		freespace ;
668+ 	Size 		freespace ;
673669
674670	/* callers must have checked */ 
675671	Assert (itemsz  <= BrinMaxItemSize );
@@ -825,10 +821,8 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
825821
826822			ereport (ERROR ,
827823					(errcode (ERRCODE_PROGRAM_LIMIT_EXCEEDED ),
828- 			errmsg ("index row size %lu exceeds maximum %lu for index \"%s\"" ,
829- 				   (unsigned long ) itemsz ,
830- 				   (unsigned long ) freespace ,
831- 				   RelationGetRelationName (irel ))));
824+ 			errmsg ("index row size %zu exceeds maximum %zu for index \"%s\"" ,
825+ 				   itemsz , freespace , RelationGetRelationName (irel ))));
832826			return  InvalidBuffer ;		/* keep compiler quiet */ 
833827		}
834828
0 commit comments