Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit586d75a

Browse files
committed
Remove unused macros.
CHECK_PAGE_OFFSET_RANGE() has been unused forever.CHECK_RELATION_BLOCK_RANGE() has been unused in pgstatindex.c ever sincebt_page_stats() and bt_page_items() functions were moved from pgstattupleto pageinspect module. It still exists in pageinspect/btreefuncs.c.Daniel Gustafsson
1 parent67349e5 commit586d75a

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

‎contrib/pageinspect/btreefuncs.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ PG_FUNCTION_INFO_V1(bt_page_stats);
4646
#defineIS_INDEX(r) ((r)->rd_rel->relkind == RELKIND_INDEX)
4747
#defineIS_BTREE(r) ((r)->rd_rel->relam == BTREE_AM_OID)
4848

49-
#defineCHECK_PAGE_OFFSET_RANGE(pg,offnum) { \
50-
if ( !(FirstOffsetNumber <= (offnum) && \
51-
(offnum) <= PageGetMaxOffsetNumber(pg)) ) \
52-
elog(ERROR, "page offset number out of range"); }
53-
5449
/* note: BlockNumber is unsigned, hence can't be negative */
5550
#defineCHECK_RELATION_BLOCK_RANGE(rel,blkno) { \
5651
if ( RelationGetNumberOfBlocks(rel) <= (BlockNumber) (blkno) ) \

‎contrib/pgstattuple/pgstatindex.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ PG_FUNCTION_INFO_V1(pgstatginindex);
5151
#defineIS_BTREE(r) ((r)->rd_rel->relam == BTREE_AM_OID)
5252
#defineIS_GIN(r) ((r)->rd_rel->relam == GIN_AM_OID)
5353

54-
#defineCHECK_PAGE_OFFSET_RANGE(pg,offnum) { \
55-
if ( !(FirstOffsetNumber <= (offnum) && \
56-
(offnum) <= PageGetMaxOffsetNumber(pg)) ) \
57-
elog(ERROR, "page offset number out of range"); }
58-
59-
/* note: BlockNumber is unsigned, hence can't be negative */
60-
#defineCHECK_RELATION_BLOCK_RANGE(rel,blkno) { \
61-
if ( RelationGetNumberOfBlocks(rel) <= (BlockNumber) (blkno) ) \
62-
elog(ERROR, "block number out of range"); }
63-
6454
/* ------------------------------------------------
6555
* A structure for a whole btree index statistics
6656
* used by pgstatindex().

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp