Document that NAMEDATALEN must be a multiple of sizeof(int).
authorTom Lane <[email protected]>
Tue, 30 Apr 2002 19:53:03 +0000 (19:53 +0000)
committerTom Lane <[email protected]>
Tue, 30 Apr 2002 19:53:03 +0000 (19:53 +0000)
src/include/c.h
src/include/postgres_ext.h

index 1b1a09160c7a0b70e18fc90c584513812071824e..3368187908142f8b5c07693bcbf50a1b80b283d2 100644 (file)
@@ -420,7 +420,9 @@ typedef Oid oidvector[INDEX_MAX_KEYS];
 /*
  * We want NameData to have length NAMEDATALEN and int alignment,
  * because that's how the data type 'name' is defined in pg_type.
- * Use a union to make sure the compiler agrees.
+ * Use a union to make sure the compiler agrees.  Note that NAMEDATALEN
+ * must be a multiple of sizeof(int), else sizeof(NameData) will probably
+ * not come out equal to NAMEDATALEN.
  */
 typedef union nameData
 {
index 9b79a23f15a0fb4e24293bd66c7f7ea14b867df9..78aedf4c024a67236f7d8a288b9b571de086db72 100644 (file)
@@ -36,7 +36,8 @@ typedef unsigned int Oid;
 
 /*
  * NAMEDATALEN is the max length for system identifiers (e.g. table names,
- * attribute names, function names, etc.)
+ * attribute names, function names, etc).  It must be a multiple of
+ * sizeof(int) (typically 4).
  *
  * NOTE that databases with different NAMEDATALEN's cannot interoperate!
  */