mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Improve indenting in _hash_pgaddtup
The Assert added in d09dbeb9b
came out rather ugly after having run
pgindent on that code. Here we adjust things to use some local variables
so that the Assert remains within the 80-character margin.
Author: Ted Yu
Discussion: https://postgr.es/m/CALte62wLSir1=x93Jf0xZvHaO009FEJfhVMFwnaR8q=csPP8kQ@mail.gmail.com
This commit is contained in:
parent
2cf41cd309
commit
ec5affdbc2
@ -290,12 +290,20 @@ _hash_pgaddtup(Relation rel, Buffer buf, Size itemsize, IndexTuple itup,
|
||||
{
|
||||
itup_off = PageGetMaxOffsetNumber(page) + 1;
|
||||
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
/* ensure this tuple's hashkey is >= the final existing tuple */
|
||||
Assert(PageGetMaxOffsetNumber(page) == 0 ||
|
||||
_hash_get_indextuple_hashkey((IndexTuple)
|
||||
PageGetItem(page, PageGetItemId(page,
|
||||
PageGetMaxOffsetNumber(page)))) <=
|
||||
_hash_get_indextuple_hashkey(itup));
|
||||
if (PageGetMaxOffsetNumber(page) > 0)
|
||||
{
|
||||
IndexTuple lasttup;
|
||||
ItemId itemid;
|
||||
|
||||
itemid = PageGetItemId(page, PageGetMaxOffsetNumber(page));
|
||||
lasttup = (IndexTuple) PageGetItem(page, itemid);
|
||||
|
||||
Assert(_hash_get_indextuple_hashkey(lasttup) <=
|
||||
_hash_get_indextuple_hashkey(itup));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user