mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
Add some const qualifications
Add some const qualifications afforded by the previous change that added a const qualification to PageAddItemExtended(). Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Peter Geoghegan <pg@bowt.ie> Discussion: https://www.postgresql.org/message-id/flat/c75cccf5-5709-407b-a36a-2ae6570be766@eisentraut.org
This commit is contained in:
@@ -340,7 +340,7 @@ brin_can_do_samepage_update(Buffer buffer, Size origsz, Size newsz)
|
||||
OffsetNumber
|
||||
brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
|
||||
BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk,
|
||||
BrinTuple *tup, Size itemsz)
|
||||
const BrinTuple *tup, Size itemsz)
|
||||
{
|
||||
Page page;
|
||||
BlockNumber blk;
|
||||
|
||||
@@ -57,7 +57,7 @@ typedef struct KeyArray
|
||||
*/
|
||||
static int32
|
||||
writeListPage(Relation index, Buffer buffer,
|
||||
IndexTuple *tuples, int32 ntuples, BlockNumber rightlink)
|
||||
const IndexTuple *tuples, int32 ntuples, BlockNumber rightlink)
|
||||
{
|
||||
Page page = BufferGetPage(buffer);
|
||||
int32 i,
|
||||
|
||||
@@ -61,7 +61,7 @@ static Buffer _bt_split(Relation rel, Relation heaprel, BTScanInsert itup_key,
|
||||
static void _bt_insert_parent(Relation rel, Relation heaprel, Buffer buf,
|
||||
Buffer rbuf, BTStack stack, bool isroot, bool isonly);
|
||||
static Buffer _bt_newlevel(Relation rel, Relation heaprel, Buffer lbuf, Buffer rbuf);
|
||||
static inline bool _bt_pgaddtup(Page page, Size itemsize, IndexTuple itup,
|
||||
static inline bool _bt_pgaddtup(Page page, Size itemsize, const IndexTupleData *itup,
|
||||
OffsetNumber itup_off, bool newfirstdataitem);
|
||||
static void _bt_delete_or_dedup_one_page(Relation rel, Relation heapRel,
|
||||
BTInsertState insertstate,
|
||||
@@ -2634,7 +2634,7 @@ _bt_newlevel(Relation rel, Relation heaprel, Buffer lbuf, Buffer rbuf)
|
||||
static inline bool
|
||||
_bt_pgaddtup(Page page,
|
||||
Size itemsize,
|
||||
IndexTuple itup,
|
||||
const IndexTupleData *itup,
|
||||
OffsetNumber itup_off,
|
||||
bool newfirstdataitem)
|
||||
{
|
||||
|
||||
@@ -266,7 +266,7 @@ static BulkWriteBuffer _bt_blnewpage(BTWriteState *wstate, uint32 level);
|
||||
static BTPageState *_bt_pagestate(BTWriteState *wstate, uint32 level);
|
||||
static void _bt_slideleft(Page rightmostpage);
|
||||
static void _bt_sortaddtup(Page page, Size itemsize,
|
||||
IndexTuple itup, OffsetNumber itup_off,
|
||||
const IndexTupleData *itup, OffsetNumber itup_off,
|
||||
bool newfirstdataitem);
|
||||
static void _bt_buildadd(BTWriteState *wstate, BTPageState *state,
|
||||
IndexTuple itup, Size truncextra);
|
||||
@@ -716,7 +716,7 @@ _bt_slideleft(Page rightmostpage)
|
||||
static void
|
||||
_bt_sortaddtup(Page page,
|
||||
Size itemsize,
|
||||
IndexTuple itup,
|
||||
const IndexTupleData *itup,
|
||||
OffsetNumber itup_off,
|
||||
bool newfirstdataitem)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ extern bool brin_can_do_samepage_update(Buffer buffer, Size origsz,
|
||||
Size newsz);
|
||||
extern OffsetNumber brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
|
||||
BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk,
|
||||
BrinTuple *tup, Size itemsz);
|
||||
const BrinTuple *tup, Size itemsz);
|
||||
|
||||
extern void brin_page_init(Page page, uint16 type);
|
||||
extern void brin_metapage_init(Page page, BlockNumber pagesPerRange,
|
||||
|
||||
Reference in New Issue
Block a user