Re: indentation in _hash_pgaddtup()
От | Tom Lane |
---|---|
Тема | Re: indentation in _hash_pgaddtup() |
Дата | |
Msg-id | 3854935.1669302661@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: indentation in _hash_pgaddtup() (Daniel Gustafsson <daniel@yesql.se>) |
Ответы |
Re: indentation in _hash_pgaddtup()
|
Список | pgsql-hackers |
Daniel Gustafsson <daniel@yesql.se> writes: >> On 24 Nov 2022, at 13:42, Ted Yu <yuzhihong@gmail.com> wrote: >> In _hash_pgaddtup(), it seems the indentation is off for the assertion. > Indentation is handled by applying src/tools/pgindent to the code, and > re-running it on this file yields no re-indentation so this is in fact correct > according to the pgindent rules. It is one messy bit of code though --- perhaps a little more thought about where to put line breaks would help? Alternatively, it could be split into multiple statements, along the lines of #ifdef USE_ASSERT_CHECKING if (PageGetMaxOffsetNumber(page) > 0) { IndexTuple lasttup = PageGetItem(page, PageGetItemId(page, PageGetMaxOffsetNumber(page))); Assert(_hash_get_indextuple_hashkey(lasttup) <= _hash_get_indextuple_hashkey(itup)); } #endif (details obviously tweakable) regards, tom lane
В списке pgsql-hackers по дате отправления: