1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Silence a rather odd compiler warning. In passing, make this file's

error messages look at least a little bit like the message style
guidelines say.
This commit is contained in:
Tom Lane
2007-07-15 23:09:26 +00:00
parent a190eb3d7d
commit cfd6c89b04
2 changed files with 18 additions and 18 deletions

View File

@ -47,14 +47,14 @@ extern Datum pg_relpages(PG_FUNCTION_ARGS);
#define IS_INDEX(r) ((r)->rd_rel->relkind == 'i')
#define IS_BTREE(r) ((r)->rd_rel->relam == BTREE_AM_OID)
#define CHECK_PAGE_OFFSET_RANGE(page, offset) { \
if ( !(FirstOffsetNumber<=(offset) && \
(offset)<=PageGetMaxOffsetNumber(page)) ) \
elog(ERROR, "Page offset number out of range."); }
#define CHECK_PAGE_OFFSET_RANGE(pg, offnum) { \
if ( !(FirstOffsetNumber<=(offnum) && \
(offnum)<=PageGetMaxOffsetNumber(pg)) ) \
elog(ERROR, "page offset number out of range"); }
#define CHECK_RELATION_BLOCK_RANGE(rel, blkno) { \
if ( (blkno)<0 && RelationGetNumberOfBlocks((rel))<=(blkno) ) \
elog(ERROR, "Block number out of range."); }
elog(ERROR, "block number out of range"); }
/* ------------------------------------------------
* A structure for a whole btree index statistics
@ -100,7 +100,7 @@ pgstatindex(PG_FUNCTION_ARGS)
rel = relation_openrv(relrv, AccessShareLock);
if (!IS_INDEX(rel) || !IS_BTREE(rel))
elog(ERROR, "pgstatindex() can be used only on b-tree index.");
elog(ERROR, "pgstatindex() can only be used on b-tree index");
/*-------------------
* Read a metapage