1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

>the extra level of struct naming for pd_opaque has no obvious

>usefulness.
>
>> [...] should I post a patch that puts pagesize directly into
>> PageHeaderData?
>
>If you're so inclined.  Given that pd_opaque is hidden in those macros,
>there wouldn't be much of any gain in readability either, so I haven't
>worried about changing the declaration.

Thanks for the clarification.  Here is the patch.  Not much gain, but at
least it saves the next junior hacker from scratching his head ...


Manfred Koizar
This commit is contained in:
Bruce Momjian
2002-07-02 06:18:57 +00:00
parent 22347d69c9
commit c9a7345217
2 changed files with 18 additions and 26 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.30 2002/06/20 20:29:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.31 2002/07/02 06:18:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -131,13 +131,13 @@ _hash_checkpage(Page page, int flags)
HashPageOpaque opaque;
Assert(page);
Assert(((PageHeader) (page))->pd_lower >= (sizeof(PageHeaderData) - sizeof(ItemIdData)));
Assert(((PageHeader) (page))->pd_lower >= SizeOfPageHeaderData);
#if 1
Assert(((PageHeader) (page))->pd_upper <=
(BLCKSZ - MAXALIGN(sizeof(HashPageOpaqueData))));
Assert(((PageHeader) (page))->pd_special ==
(BLCKSZ - MAXALIGN(sizeof(HashPageOpaqueData))));
Assert(((PageHeader) (page))->pd_opaque.od_pagesize == BLCKSZ);
Assert(PageGetPageSize(page) == BLCKSZ);
#endif
if (flags)
{