diff options
author | Tom Lane | 2002-04-30 19:53:03 +0000 |
---|---|---|
committer | Tom Lane | 2002-04-30 19:53:03 +0000 |
commit | de5fbc9c9d24f6cbade00e485327f01524d1798d (patch) | |
tree | 73fd24430021907ad91c7c8c22c1c89c94c77497 | |
parent | 2e2f71bc9f2c438c9b166a0ce752f9de0383f6af (diff) |
Document that NAMEDATALEN must be a multiple of sizeof(int).
-rw-r--r-- | src/include/c.h | 4 | ||||
-rw-r--r-- | src/include/postgres_ext.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/include/c.h b/src/include/c.h index 1b1a09160c..3368187908 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -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 { diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index 9b79a23f15..78aedf4c02 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -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! */ |