summaryrefslogtreecommitdiff
path: root/contrib/pageinspect/heapfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pageinspect/heapfuncs.c')
-rw-r--r--contrib/pageinspect/heapfuncs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c
index abf50de5fa3..931c1a50365 100644
--- a/contrib/pageinspect/heapfuncs.c
+++ b/contrib/pageinspect/heapfuncs.c
@@ -18,7 +18,7 @@
* Copyright (c) 2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/contrib/pageinspect/heapfuncs.c,v 1.1 2007/05/17 19:11:24 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/pageinspect/heapfuncs.c,v 1.2 2007/09/12 22:10:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -156,15 +156,15 @@ heap_page_items(PG_FUNCTION_ARGS)
* could be corrupt in many other ways, but at least we won't
* crash.
*/
- if ((lp_len >= sizeof(HeapTupleHeader)) &&
- (lp_offset == MAXALIGN(lp_offset)) &&
- (lp_offset + lp_len <= raw_page_size) &&
- ItemIdIsUsed(id))
+ if (ItemIdHasStorage(id) &&
+ lp_len >= sizeof(HeapTupleHeader) &&
+ lp_offset == MAXALIGN(lp_offset) &&
+ lp_offset + lp_len <= raw_page_size)
{
HeapTupleHeader tuphdr;
int bits_len;
- /* Extract infromation from the tuple header */
+ /* Extract information from the tuple header */
tuphdr = (HeapTupleHeader) PageGetItem(page, id);