summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian1999-07-03 00:33:04 +0000
committerBruce Momjian1999-07-03 00:33:04 +0000
commit97dfff832cbc79a48ac2e053f2628c18027ee0a2 (patch)
treecd917280489ad0d84fb9fbb45fe775bbcc71c6e0 /src/include
parent954e466c27ad6e6933b99217749e7cb078243fc1 (diff)
Fix to prevent too large tuple from being created.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/htup.h9
-rw-r--r--src/include/storage/bufpage.h14
2 files changed, 8 insertions, 15 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h
index 996d2c158c6..d4107b9cc2f 100644
--- a/src/include/access/htup.h
+++ b/src/include/access/htup.h
@@ -6,14 +6,14 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: htup.h,v 1.16 1999/05/25 22:42:32 momjian Exp $
+ * $Id: htup.h,v 1.17 1999/07/03 00:32:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef HTUP_H
#define HTUP_H
-#include <utils/nabstime.h>
+#include <storage/bufpage.h>
#include <storage/itemptr.h>
#define MinHeapTupleBitmapSize 32 /* 8 * 4 */
@@ -52,6 +52,11 @@ typedef struct HeapTupleHeaderData
typedef HeapTupleHeaderData *HeapTupleHeader;
+#define MinTupleSize (sizeof (PageHeaderData) + \
+ sizeof(HeapTupleHeaderData) + sizeof(int4))
+
+#define MaxTupleSize (BLCKSZ/2 - MinTupleSize)
+
#define SelfItemPointerAttributeNumber (-1)
#define ObjectIdAttributeNumber (-2)
#define MinTransactionIdAttributeNumber (-3)
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 5c8574a4509..74729eaddc4 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bufpage.h,v 1.22 1999/05/25 16:14:40 momjian Exp $
+ * $Id: bufpage.h,v 1.23 1999/07/03 00:32:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -133,18 +133,6 @@ typedef enum
OverwritePageManagerMode
} PageManagerMode;
-/* ----------------
- * misc support macros
- * ----------------
- */
-
-/*
- * XXX this is wrong -- ignores padding/alignment, variable page size,
- * AM-specific opaque space at the end of the page (as in btrees), ...
- * however, it at least serves as an upper bound for heap pages.
- */
-#define MAXTUPLEN (BLCKSZ - sizeof (PageHeaderData))
-
/* ----------------------------------------------------------------
* page support macros
* ----------------------------------------------------------------