diff options
Diffstat (limited to 'src/backend/access/hash')
| -rw-r--r-- | src/backend/access/hash/hash_xlog.c | 7 | ||||
| -rw-r--r-- | src/backend/access/hash/hashinsert.c | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c index d963a0c3702..2a0145f3c9b 100644 --- a/src/backend/access/hash/hash_xlog.c +++ b/src/backend/access/hash/hash_xlog.c @@ -137,8 +137,7 @@ hash_xlog_insert(XLogReaderState *record) page = BufferGetPage(buffer); - if (PageAddItem(page, (Item) datapos, datalen, xlrec->offnum, - false, false) == InvalidOffsetNumber) + if (PageAddItem(page, datapos, datalen, xlrec->offnum, false, false) == InvalidOffsetNumber) elog(PANIC, "hash_xlog_insert: failed to add item"); PageSetLSN(page, lsn); @@ -557,7 +556,7 @@ hash_xlog_move_page_contents(XLogReaderState *record) data += itemsz; - l = PageAddItem(writepage, (Item) itup, itemsz, towrite[ninserted], false, false); + l = PageAddItem(writepage, itup, itemsz, towrite[ninserted], false, false); if (l == InvalidOffsetNumber) elog(ERROR, "hash_xlog_move_page_contents: failed to add item to hash index page, size %d bytes", (int) itemsz); @@ -689,7 +688,7 @@ hash_xlog_squeeze_page(XLogReaderState *record) data += itemsz; - l = PageAddItem(writepage, (Item) itup, itemsz, towrite[ninserted], false, false); + l = PageAddItem(writepage, itup, itemsz, towrite[ninserted], false, false); if (l == InvalidOffsetNumber) elog(ERROR, "hash_xlog_squeeze_page: failed to add item to hash index page, size %d bytes", (int) itemsz); diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c index 10de1580dc2..0f9f97f7e3d 100644 --- a/src/backend/access/hash/hashinsert.c +++ b/src/backend/access/hash/hashinsert.c @@ -310,10 +310,8 @@ _hash_pgaddtup(Relation rel, Buffer buf, Size itemsize, IndexTuple itup, itup_off = _hash_binsearch(page, hashkey); } - if (PageAddItem(page, (Item) itup, itemsize, itup_off, false, false) - == InvalidOffsetNumber) - elog(ERROR, "failed to add index item to \"%s\"", - RelationGetRelationName(rel)); + if (PageAddItem(page, itup, itemsize, itup_off, false, false) == InvalidOffsetNumber) + elog(ERROR, "failed to add index item to \"%s\"", RelationGetRelationName(rel)); return itup_off; } @@ -352,10 +350,8 @@ _hash_pgaddmultitup(Relation rel, Buffer buf, IndexTuple *itups, itup_offsets[i] = itup_off; - if (PageAddItem(page, (Item) itups[i], itemsize, itup_off, false, false) - == InvalidOffsetNumber) - elog(ERROR, "failed to add index item to \"%s\"", - RelationGetRelationName(rel)); + if (PageAddItem(page, itups[i], itemsize, itup_off, false, false) == InvalidOffsetNumber) + elog(ERROR, "failed to add index item to \"%s\"", RelationGetRelationName(rel)); } } |
