summaryrefslogtreecommitdiff
path: root/src/include/access/itup.h
diff options
context:
space:
mode:
authorTom Lane2008-07-13 20:45:47 +0000
committerTom Lane2008-07-13 20:45:47 +0000
commit9d035f425452279041c52e01cf83b2a27e121b5c (patch)
treed521a3bdb9ca231ed49e09a48259a45b519f6d1c /src/include/access/itup.h
parent45efb09a01e93d20ccb5671703649d9f87f744de (diff)
Clean up the use of some page-header-access macros: principally, use
SizeOfPageHeaderData instead of sizeof(PageHeaderData) in places where that makes the code clearer, and avoid casting between Page and PageHeader where possible. Zdenek Kotala, with some additional cleanup by Heikki Linnakangas. I did not apply the parts of the proposed patch that would have resulted in slightly changing the on-disk format of hash indexes; it seems to me that's not a win as long as there's any chance of having in-place upgrade for 8.4.
Diffstat (limited to 'src/include/access/itup.h')
-rw-r--r--src/include/access/itup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/itup.h b/src/include/access/itup.h
index eb637b81ea4..ae53accde7c 100644
--- a/src/include/access/itup.h
+++ b/src/include/access/itup.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/itup.h,v 1.49 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/itup.h,v 1.50 2008/07/13 20:45:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -134,7 +134,7 @@ typedef IndexAttributeBitMapData *IndexAttributeBitMap;
* must be maxaligned, and it must have an associated item pointer.
*/
#define MaxIndexTuplesPerPage \
- ((int) ((BLCKSZ - offsetof(PageHeaderData, pd_linp)) / \
+ ((int) ((BLCKSZ - SizeOfPageHeaderData) / \
(MAXALIGN(sizeof(IndexTupleData) + 1) + sizeof(ItemIdData))))