Comment improvements.
authorBruce Momjian
Wed, 21 Feb 2001 19:07:04 +0000 (19:07 +0000)
committerBruce Momjian
Wed, 21 Feb 2001 19:07:04 +0000 (19:07 +0000)
src/include/access/htup.h
src/include/access/itup.h
src/include/access/nbtree.h
src/include/storage/bufpage.h

index ce7b4a2d87458e570169155ff01e5b332477305e..76306b67bb6cf0b6b339d31459f93c8f595500d9 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: htup.h,v 1.45 2001/01/24 19:43:19 momjian Exp $
+ * $Id: htup.h,v 1.46 2001/02/21 19:07:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -32,7 +32,9 @@
 #define MaxHeapAttributeNumber 1600    /* 8 * 200 */
 
 /*
- * to avoid wasting space, the attributes should be layed out in such a
+ * This is the on-disk copy of the tuple.
+ * 
+ * To avoid wasting space, the attributes should be layed out in such a
  * way to reduce structure padding.
  */
 typedef struct HeapTupleHeaderData
@@ -51,12 +53,12 @@ typedef struct HeapTupleHeaderData
 
    uint16      t_infomask;     /* various infos */
 
-   uint8       t_hoff;         /* sizeof tuple header */
+   uint8       t_hoff;         /* sizeof() tuple header */
 
                                /* ^ - 31 bytes - ^ */
 
    bits8       t_bits[MinHeapTupleBitmapSize / 8];
-   /* bit map of domains */
+   /* bit map of NULLs */
 
    /* MORE DATA FOLLOWS AT END OF STRUCT */
 } HeapTupleHeaderData;
@@ -174,6 +176,8 @@ typedef struct xl_heap_clean
 #define FirstLowInvalidHeapAttributeNumber     (-8)
 
 /*
+ * This is the in-memory copy of the tuple.
+ *
  * This new HeapTuple for version >= 6.5 and this is why it was changed:
  *
  * 1. t_len moved off on-disk tuple data - ItemIdData is used to get len;
@@ -190,10 +194,10 @@ typedef struct xl_heap_clean
 typedef struct HeapTupleData
 {
    uint32          t_len;          /* length of *t_data */
-   ItemPointerData t_self;     /* SelfItemPointer */
+   ItemPointerData t_self;         /* SelfItemPointer */
    Oid             t_tableOid;     /* table the tuple came from */
-   MemoryContext   t_datamcxt; /* mcxt in which allocated */
-   HeapTupleHeader t_data;     /* -> tuple header and data */
+   MemoryContext   t_datamcxt;     /* memory context of allocation */
+   HeapTupleHeader t_data;         /* -> tuple header and data */
 } HeapTupleData;
 
 typedef HeapTupleData *HeapTuple;
index 717bcd68ae31dd13b0e8cac2ee3778d400f8d9bf..7d124ef56f6c56334491357836c400bba99d058d 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: itup.h,v 1.28 2001/01/24 19:43:19 momjian Exp $
+ * $Id: itup.h,v 1.29 2001/02/21 19:07:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,7 +22,7 @@
 
 typedef struct IndexTupleData
 {
-   ItemPointerData t_tid;      /* reference TID to base tuple */
+   ItemPointerData t_tid;      /* reference TID to heap tuple */
 
    /*
     * t_info is layed out in the following fashion:
index e8d0950ecc1091cd8106fa0760369d70a1ae5329..d87cf0eced4ccb9af168af371980f28f9110c24b 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: nbtree.h,v 1.51 2001/02/07 23:34:18 vadim Exp $
+ * $Id: nbtree.h,v 1.52 2001/02/21 19:07:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -37,15 +37,17 @@ typedef struct BTPageOpaqueData
    BlockNumber btpo_parent;
    uint16      btpo_flags;
 
+} BTPageOpaqueData;
+
+typedef BTPageOpaqueData *BTPageOpaque;
+
 /* Bits defined in btpo_flags */
 #define BTP_LEAF       (1 << 0)    /* It's a leaf page */
 #define BTP_ROOT       (1 << 1)    /* It's the root page (has no parent) */
 #define BTP_FREE       (1 << 2)    /* not currently used... */
 #define BTP_META       (1 << 3)    /* Set in the meta-page only */
 #define    BTP_REORDER     (1 << 4)    /* items must be re-ordered */
-} BTPageOpaqueData;
 
-typedef BTPageOpaqueData *BTPageOpaque;
 
 #define BTREE_METAPAGE 0   /* first page is meta */
 #define BTREE_MAGIC        0x053162
index 7eb84e392d28eb70da90e5b52a8a201620b3eb32..07a5f2447ce747b5c5f461d7e9a6e8581c9f9495 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: bufpage.h,v 1.39 2001/01/24 19:43:27 momjian Exp $
+ * $Id: bufpage.h,v 1.40 2001/02/21 19:07:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -23,7 +23,7 @@
 #include "access/xlog.h"
 
 /*
- * a postgres disk page is an abstraction layered on top of a postgres
+ * A postgres disk page is an abstraction layered on top of a postgres
  * disk block (which is simply a unit of i/o, see block.h).
  *
  * specifically, while a disk block can be unformatted, a postgres