Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 50ad4a7

Browse files
committed
Make 'name' type int aligned, like char/varchar.
1 parent 4166f73 commit 50ad4a7

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

src/backend/access/common/indextuple.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.29 1998/06/15 19:27:44 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.30 1998/08/27 05:06:54 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -66,9 +66,7 @@ index_formtuple(TupleDesc tupleDescriptor,
6666
infomask |= INDEX_NULL_MASK;
6767

6868
hoff = IndexInfoFindDataOffset(infomask);
69-
size = hoff
70-
+ ComputeDataSize(tupleDescriptor,
71-
value, null);
69+
size = hoff + ComputeDataSize(tupleDescriptor, value, null);
7270
size = DOUBLEALIGN(size); /* be conservative */
7371

7472
tp = (char *) palloc(size);

src/include/catalog/pg_attribute.h

+14-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_attribute.h,v 1.40 1998/08/27 01:04:23 momjian Exp $
10+
* $Id: pg_attribute.h,v 1.41 1998/08/27 05:06:56 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -178,7 +178,7 @@ typedef FormData_pg_attribute *AttributeTupleForm;
178178
* ----------------
179179
*/
180180
#define Schema_pg_type \
181-
{ 1247, {"typname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
181+
{ 1247, {"typname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
182182
{ 1247, {"typowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
183183
{ 1247, {"typlen"}, 21, 0, 2, 3, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
184184
{ 1247, {"typprtlen"}, 21, 0, 2, 4, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
@@ -195,7 +195,7 @@ typedef FormData_pg_attribute *AttributeTupleForm;
195195
{ 1247, {"typalign"}, 18, 0, 1, 15, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
196196
{ 1247, {"typdefault"}, 25, 0, -1, 16, 0, -1, -1, '\0' , '\0', 'i', '\0', '\0' }
197197

198-
DATA(insert OID = 0 ( 1247 typname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
198+
DATA(insert OID = 0 ( 1247 typname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
199199
DATA(insert OID = 0 ( 1247 typowner 23 0 4 2 0 -1 -1 t f i f f));
200200
DATA(insert OID = 0 ( 1247 typlen 21 0 2 3 0 -1 -1 t f s f f));
201201
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));
222222
* pg_database
223223
* ----------------
224224
*/
225-
DATA(insert OID = 0 ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
225+
DATA(insert OID = 0 ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
226226
DATA(insert OID = 0 ( 1262 datdba 23 0 4 2 0 -1 -1 t f i f f));
227227
DATA(insert OID = 0 ( 1262 encoding 23 0 4 3 0 -1 -1 t f i f f));
228228
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));
238238
* ----------------
239239
*/
240240
#define Schema_pg_proc \
241-
{ 1255, {"proname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
241+
{ 1255, {"proname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
242242
{ 1255, {"proowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
243243
{ 1255, {"prolang"}, 26, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
244244
{ 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));
255255
{ 1255, {"prosrc"}, 25, 0, -1, 15, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
256256
{ 1255, {"probin"}, 17, 0, -1, 16, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
257257

258-
DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
258+
DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
259259
DATA(insert OID = 0 ( 1255 proowner 23 0 4 2 0 -1 -1 t f i f f));
260260
DATA(insert OID = 0 ( 1255 prolang 26 0 4 3 0 -1 -1 t f i f f));
261261
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));
282282
* pg_shadow
283283
* ----------------
284284
*/
285-
DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
285+
DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
286286
DATA(insert OID = 0 ( 1260 usesysid 23 0 4 2 0 -1 -1 t f i f f));
287287
DATA(insert OID = 0 ( 1260 usecreatedb 16 0 1 3 0 -1 -1 t f c f f));
288288
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));
301301
* pg_group
302302
* ----------------
303303
*/
304-
DATA(insert OID = 0 ( 1261 groname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
304+
DATA(insert OID = 0 ( 1261 groname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
305305
DATA(insert OID = 0 ( 1261 grosysid 23 0 4 2 0 -1 -1 t f i f f));
306306
DATA(insert OID = 0 ( 1261 grolist 1007 0 -1 3 0 -1 -1 f f i f f));
307307
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));
317317
*/
318318
#define Schema_pg_attribute \
319319
{ 1249, {"attrelid"}, 26, 0, 4, 1, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
320-
{ 1249, {"attname"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
320+
{ 1249, {"attname"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
321321
{ 1249, {"atttypid"}, 26, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
322322
{ 1249, {"attdisbursion"}, 700, 0, 4, 4, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
323323
{ 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));
332332
{ 1249, {"atthasdef"}, 16, 0, 1, 14, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }
333333

334334
DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 -1 t f i f f));
335-
DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 -1 f f d f f));
335+
DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
336336
DATA(insert OID = 0 ( 1249 atttypid 26 0 4 3 0 -1 -1 t f i f f));
337337
DATA(insert OID = 0 ( 1249 attdisbursion 700 0 4 4 0 -1 -1 f f i f f));
338338
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));
357357
* ----------------
358358
*/
359359
#define Schema_pg_class \
360-
{ 1259, {"relname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'd', '\0', '\0' }, \
360+
{ 1259, {"relname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
361361
{ 1259, {"reltype"}, 26, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
362362
{ 1259, {"relowner"}, 23, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
363363
{ 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));
372372
{ 1259, {"relhasrules"}, 16, 0, 1, 13, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
373373
{ 1259, {"relacl"}, 1034, 0, -1, 14, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
374374

375-
DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 -1 f f d f f));
375+
DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
376376
DATA(insert OID = 0 ( 1259 reltype 26 0 4 2 0 -1 -1 t f i f f));
377377
DATA(insert OID = 0 ( 1259 relowner 23 0 4 3 0 -1 -1 t f i f f));
378378
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));
413413
* ----------------
414414
*/
415415
DATA(insert OID = 0 ( 1216 rcrelid 26 0 4 1 0 -1 -1 t f i f f));
416-
DATA(insert OID = 0 ( 1216 rcname 19 0 NAMEDATALEN 2 0 -1 -1 f f d f f));
416+
DATA(insert OID = 0 ( 1216 rcname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
417417
DATA(insert OID = 0 ( 1216 rcbin 25 0 -1 3 0 -1 -1 f f i f f));
418418
DATA(insert OID = 0 ( 1216 rcsrc 25 0 -1 4 0 -1 -1 f f i f f));
419419
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));
428428
* ----------------
429429
*/
430430
DATA(insert OID = 0 ( 1219 tgrelid 26 0 4 1 0 -1 -1 t f i f f));
431-
DATA(insert OID = 0 ( 1219 tgname 19 0 NAMEDATALEN 2 0 -1 -1 f f d f f));
431+
DATA(insert OID = 0 ( 1219 tgname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
432432
DATA(insert OID = 0 ( 1219 tgfoid 26 0 4 3 0 -1 -1 t f i f f));
433433
DATA(insert OID = 0 ( 1219 tgtype 21 0 2 4 0 -1 -1 t f s f f));
434434
DATA(insert OID = 0 ( 1219 tgnargs 21 0 2 5 0 -1 -1 t f s f f));

src/include/catalog/pg_type.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_type.h,v 1.44 1998/08/19 02:03:56 momjian Exp $
10+
* $Id: pg_type.h,v 1.45 1998/08/27 05:06:57 momjian Exp $
1111
*
1212
* NOTES
1313
* 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
162162
DESCR("single character");
163163
#define CHAROID 18
164164

165-
DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 namein nameout namein nameout d _null_ ));
165+
DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 namein nameout namein nameout i _null_ ));
166166
DESCR("31-character type for storing system identifiers");
167167
#define NAMEOID 19
168168

0 commit comments

Comments
 (0)