@@ -56,14 +56,14 @@ extern Datum bt_page_stats(PG_FUNCTION_ARGS);
5656#define IS_INDEX (r ) ((r)->rd_rel->relkind == 'i')
5757#define IS_BTREE (r ) ((r)->rd_rel->relam == BTREE_AM_OID)
5858
59- #define CHECK_PAGE_OFFSET_RANGE (page , offset ) { \
60- if ( !(FirstOffsetNumber<=(offset ) && \
61- (offset )<=PageGetMaxOffsetNumber(page )) ) \
62- elog(ERROR, "Page offset number out of range. "); }
59+ #define CHECK_PAGE_OFFSET_RANGE (pg , offnum ) { \
60+ if ( !(FirstOffsetNumber<=(offnum ) && \
61+ (offnum )<=PageGetMaxOffsetNumber(pg )) ) \
62+ elog(ERROR, "page offset number out of range"); }
6363
6464#define CHECK_RELATION_BLOCK_RANGE (rel ,blkno ) { \
6565if ( (blkno)<0 && RelationGetNumberOfBlocks((rel))<=(blkno) ) \
66- elog(ERROR, "Block number out of range. "); }
66+ elog(ERROR, "block number out of range"); }
6767
6868/* ------------------------------------------------
6969 * structure for single btree page statistics
@@ -220,10 +220,10 @@ bt_page_stats(PG_FUNCTION_ARGS)
220220buffer = ReadBuffer (rel ,blkno );
221221
222222if (!IS_INDEX (rel )|| !IS_BTREE (rel ))
223- elog (ERROR ,"bt_page_stats() can be usedonly on b-tree index. " );
223+ elog (ERROR ,"bt_page_stats() canonly be used on b-tree index" );
224224
225225if (blkno == 0 )
226- elog (ERROR ,"Block 0 is a meta page. " );
226+ elog (ERROR ,"block 0 is a meta page" );
227227
228228{
229229HeapTuple tuple ;
@@ -323,7 +323,7 @@ bt_page_items(PG_FUNCTION_ARGS)
323323struct user_args * uargs = NULL ;
324324
325325if (blkno == 0 )
326- elog (ERROR ,"Block 0 is a meta page. " );
326+ elog (ERROR ,"block 0 is a meta page" );
327327
328328if (SRF_IS_FIRSTCALL ())
329329{
@@ -343,14 +343,14 @@ bt_page_items(PG_FUNCTION_ARGS)
343343uargs -> buffer = ReadBuffer (uargs -> rel ,blkno );
344344
345345if (!IS_INDEX (uargs -> rel )|| !IS_BTREE (uargs -> rel ))
346- elog (ERROR ,"bt_page_items() can be usedonly on b-tree index. " );
346+ elog (ERROR ,"bt_page_items() canonly be used on b-tree index" );
347347
348348uargs -> page = BufferGetPage (uargs -> buffer );
349349
350350opaque = (BTPageOpaque )PageGetSpecialPointer (uargs -> page );
351351
352352if (P_ISDELETED (opaque ))
353- elog (NOTICE ,"bt_page_items(): this page is deleted. " );
353+ elog (NOTICE ,"page is deleted" );
354354
355355fctx -> max_calls = PageGetMaxOffsetNumber (uargs -> page );
356356fctx -> user_fctx = uargs ;
@@ -368,7 +368,7 @@ bt_page_items(PG_FUNCTION_ARGS)
368368id = PageGetItemId (uargs -> page ,uargs -> offset );
369369
370370if (!ItemIdIsValid (id ))
371- elog (ERROR ,"Invalid ItemId. " );
371+ elog (ERROR ,"invalid ItemId" );
372372
373373itup = (IndexTuple )PageGetItem (uargs -> page ,id );
374374
@@ -453,7 +453,7 @@ bt_metap(PG_FUNCTION_ARGS)
453453rel = relation_openrv (relrv ,AccessShareLock );
454454
455455if (!IS_INDEX (rel )|| !IS_BTREE (rel ))
456- elog (ERROR ,"bt_metap() can be usedonly on b-tree index. " );
456+ elog (ERROR ,"bt_metap() canonly be used on b-tree index" );
457457
458458buffer = ReadBuffer (rel ,0 );
459459