Make 'name' type int aligned, like char/varchar.

This commit is contained in:
Bruce Momjian 1998-08-27 05:06:57 +00:00
parent 4166f73997
commit 50ad4a70b9
3 changed files with 18 additions and 20 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.29 1998/06/15 19:27:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.30 1998/08/27 05:06:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -66,9 +66,7 @@ index_formtuple(TupleDesc tupleDescriptor,
infomask |= INDEX_NULL_MASK;
hoff = IndexInfoFindDataOffset(infomask);
size = hoff
+ ComputeDataSize(tupleDescriptor,
value, null);
size = hoff + ComputeDataSize(tupleDescriptor, value, null);
size = DOUBLEALIGN(size); /* be conservative */
tp = (char *) palloc(size);

View File

@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_attribute.h,v 1.40 1998/08/27 01:04:23 momjian Exp $
* $Id: pg_attribute.h,v 1.41 1998/08/27 05:06:56 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@ -178,7 +178,7 @@ typedef FormData_pg_attribute *AttributeTupleForm;
* ----------------
*/
#define Schema_pg_type \
{ 1247, {"typname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
{ 1247, {"typname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typlen"}, 21, 0, 2, 3, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
{ 1247, {"typprtlen"}, 21, 0, 2, 4, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
@ -195,7 +195,7 @@ typedef FormData_pg_attribute *AttributeTupleForm;
{ 1247, {"typalign"}, 18, 0, 1, 15, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typdefault"}, 25, 0, -1, 16, 0, -1, -1, '\0' , '\0', 'i', '\0', '\0' }
DATA(insert OID = 0 ( 1247 typname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1247 typname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1247 typowner 23 0 4 2 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1247 typlen 21 0 2 3 0 -1 -1 t f s f f));
DATA(insert OID = 0 ( 1247 typprtlen 21 0 2 4 0 -1 -1 t f s f f));
@ -222,7 +222,7 @@ DATA(insert OID = 0 ( 1247 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* pg_database
* ----------------
*/
DATA(insert OID = 0 ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1262 datdba 23 0 4 2 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1262 encoding 23 0 4 3 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1262 datpath 25 0 -1 4 0 -1 -1 f f i f f));
@ -238,7 +238,7 @@ DATA(insert OID = 0 ( 1262 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* ----------------
*/
#define Schema_pg_proc \
{ 1255, {"proname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
{ 1255, {"proname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1255, {"proowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1255, {"prolang"}, 26, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1255, {"proisinh"}, 16, 0, 1, 4, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
@ -255,7 +255,7 @@ DATA(insert OID = 0 ( 1262 cmax 29 0 4 -6 0 -1 -1 t f i f f));
{ 1255, {"prosrc"}, 25, 0, -1, 15, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1255, {"probin"}, 17, 0, -1, 16, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1255 proowner 23 0 4 2 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1255 prolang 26 0 4 3 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1255 proisinh 16 0 1 4 0 -1 -1 t f c f f));
@ -282,7 +282,7 @@ DATA(insert OID = 0 ( 1255 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* pg_shadow
* ----------------
*/
DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1260 usesysid 23 0 4 2 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1260 usecreatedb 16 0 1 3 0 -1 -1 t f c f f));
DATA(insert OID = 0 ( 1260 usetrace 16 0 1 4 0 -1 -1 t f c f f));
@ -301,7 +301,7 @@ DATA(insert OID = 0 ( 1260 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* pg_group
* ----------------
*/
DATA(insert OID = 0 ( 1261 groname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1261 groname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1261 grosysid 23 0 4 2 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1261 grolist 1007 0 -1 3 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1261 ctid 27 0 6 -1 0 -1 -1 f f i f f));
@ -317,7 +317,7 @@ DATA(insert OID = 0 ( 1261 cmax 29 0 4 -6 0 -1 -1 t f i f f));
*/
#define Schema_pg_attribute \
{ 1249, {"attrelid"}, 26, 0, 4, 1, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attname"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
{ 1249, {"attname"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1249, {"atttypid"}, 26, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attdisbursion"}, 700, 0, 4, 4, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attlen"}, 21, 0, 2, 5, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
@ -332,7 +332,7 @@ DATA(insert OID = 0 ( 1261 cmax 29 0 4 -6 0 -1 -1 t f i f f));
{ 1249, {"atthasdef"}, 16, 0, 1, 14, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }
DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1249 atttypid 26 0 4 3 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1249 attdisbursion 700 0 4 4 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 -1 t f s f f));
@ -357,7 +357,7 @@ DATA(insert OID = 0 ( 1249 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* ----------------
*/
#define Schema_pg_class \
{ 1259, {"relname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
{ 1259, {"relname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1259, {"reltype"}, 26, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relowner"}, 23, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relam"}, 26, 0, 4, 4, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
@ -372,7 +372,7 @@ DATA(insert OID = 0 ( 1249 cmax 29 0 4 -6 0 -1 -1 t f i f f));
{ 1259, {"relhasrules"}, 16, 0, 1, 13, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relacl"}, 1034, 0, -1, 14, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1259 reltype 26 0 4 2 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1259 relowner 23 0 4 3 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1259 relam 26 0 4 4 0 -1 -1 t f i f f));
@ -413,7 +413,7 @@ DATA(insert OID = 0 ( 1215 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* ----------------
*/
DATA(insert OID = 0 ( 1216 rcrelid 26 0 4 1 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1216 rcname 19 0 NAMEDATALEN 2 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1216 rcname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1216 rcbin 25 0 -1 3 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1216 rcsrc 25 0 -1 4 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1216 ctid 27 0 6 -1 0 -1 -1 f f i f f));
@ -428,7 +428,7 @@ DATA(insert OID = 0 ( 1216 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* ----------------
*/
DATA(insert OID = 0 ( 1219 tgrelid 26 0 4 1 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1219 tgname 19 0 NAMEDATALEN 2 0 -1 -1 f f d f f));
DATA(insert OID = 0 ( 1219 tgname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1219 tgfoid 26 0 4 3 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1219 tgtype 21 0 2 4 0 -1 -1 t f s f f));
DATA(insert OID = 0 ( 1219 tgnargs 21 0 2 5 0 -1 -1 t f s f f));

View File

@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.44 1998/08/19 02:03:56 momjian Exp $
* $Id: pg_type.h,v 1.45 1998/08/27 05:06:57 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@ -162,7 +162,7 @@ DATA(insert OID = 18 ( char PGUID 1 1 t b t \054 0 0 charin charout char
DESCR("single character");
#define CHAROID 18
DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 namein nameout namein nameout d _null_ ));
DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 namein nameout namein nameout i _null_ ));
DESCR("31-character type for storing system identifiers");
#define NAMEOID 19