Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c385f7

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Required catalog changes for extended LONG attribute storage.
Jan
1 parent665db20 commit7c385f7

File tree

8 files changed

+329
-287
lines changed

8 files changed

+329
-287
lines changed

‎src/backend/access/common/tupdesc.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.57 1999/11/22 17:55:52 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.58 1999/12/20 10:40:38 wieck Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -322,6 +322,7 @@ TupleDescInitEntry(TupleDesc desc,
322322
att->atttypid=InvalidOid;
323323
att->attlen= (int16)0;
324324
att->attbyval= (bool)0;
325+
att->attstorage='p';
325326
att->attalign='i';
326327
return false;
327328
}
@@ -366,11 +367,22 @@ TupleDescInitEntry(TupleDesc desc,
366367

367368
att->attlen=typeLen(t);
368369
att->attbyval=typeByVal(t);
370+
att->attstorage='p';
369371
}
370372
else
371373
{
372374
att->attlen=typeForm->typlen;
373375
att->attbyval=typeForm->typbyval;
376+
/*
377+
* This will enable ALL variable size attributes of user
378+
* relations for automatic move off into "secondary" relation.
379+
* Jan
380+
*/
381+
#ifdefLONG_ATTRIBUTES_NOW_IMPLEMENTED_FOR_ALL_VARLENA_DATA_TYPES
382+
att->attcanlong= (att->attlen==-1) ?'e' :'p';
383+
#else
384+
att->attstorage='p';
385+
#endif
374386
}
375387

376388

@@ -401,6 +413,7 @@ TupleDescMakeSelfReference(TupleDesc desc,
401413
att->atttypid=TypeShellMake(relname);
402414
att->attlen=typeLen(t);
403415
att->attbyval=typeByVal(t);
416+
att->attstorage='p';
404417
att->attnelems=0;
405418
}
406419

‎src/backend/bootstrap/bootstrap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.73 1999/12/16 22:19:37 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.74 1999/12/20 10:40:39 wieck Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -562,6 +562,7 @@ DefineAttr(char *name, char *type, int attnum)
562562
attrtypes[attnum]->attnum=1+attnum;/* fillatt */
563563
attlen=attrtypes[attnum]->attlen=Ap->am_typ.typlen;
564564
attrtypes[attnum]->attbyval=Ap->am_typ.typbyval;
565+
attrtypes[attnum]->attstorage='p';
565566
attrtypes[attnum]->attalign=Ap->am_typ.typalign;
566567
}
567568
else
@@ -572,6 +573,7 @@ DefineAttr(char *name, char *type, int attnum)
572573
printf("<%s %s> ",NameStr(attrtypes[attnum]->attname),type);
573574
attrtypes[attnum]->attnum=1+attnum;/* fillatt */
574575
attlen=attrtypes[attnum]->attlen=Procid[typeoid].len;
576+
attrtypes[attnum]->attstorage='p';
575577

576578
/*
577579
* Cheat like mad to fill in these items from the length only.

‎src/backend/catalog/heap.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.113 1999/12/16 22:19:38 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.114 1999/12/20 10:40:40 wieck Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -105,32 +105,32 @@ static void RemoveStatistics(Relation rel);
105105

106106
staticFormData_pg_attributea1= {
107107
0xffffffff, {"ctid"},TIDOID,0,sizeof(ItemPointerData),
108-
SelfItemPointerAttributeNumber,0,-1,-1,'\0','\0','i','\0','\0'
108+
SelfItemPointerAttributeNumber,0,-1,-1,'\0','p','\0','i','\0','\0'
109109
};
110110

111111
staticFormData_pg_attributea2= {
112112
0xffffffff, {"oid"},OIDOID,0,sizeof(Oid),
113-
ObjectIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
113+
ObjectIdAttributeNumber,0,-1,-1,'\001','p','\0','i','\0','\0'
114114
};
115115

116116
staticFormData_pg_attributea3= {
117117
0xffffffff, {"xmin"},XIDOID,0,sizeof(TransactionId),
118-
MinTransactionIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
118+
MinTransactionIdAttributeNumber,0,-1,-1,'\001','p','\0','i','\0','\0'
119119
};
120120

121121
staticFormData_pg_attributea4= {
122122
0xffffffff, {"cmin"},CIDOID,0,sizeof(CommandId),
123-
MinCommandIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
123+
MinCommandIdAttributeNumber,0,-1,-1,'\001','p','\0','i','\0','\0'
124124
};
125125

126126
staticFormData_pg_attributea5= {
127127
0xffffffff, {"xmax"},XIDOID,0,sizeof(TransactionId),
128-
MaxTransactionIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
128+
MaxTransactionIdAttributeNumber,0,-1,-1,'\001','p','\0','i','\0','\0'
129129
};
130130

131131
staticFormData_pg_attributea6= {
132132
0xffffffff, {"cmax"},CIDOID,0,sizeof(CommandId),
133-
MaxCommandIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
133+
MaxCommandIdAttributeNumber,0,-1,-1,'\001','p','\0','i','\0','\0'
134134
};
135135

136136
staticForm_pg_attributeHeapAtt[]= {&a1,&a2,&a3,&a4,&a5,&a6};

‎src/backend/catalog/index.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.100 1999/12/16 22:19:39 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.101 1999/12/20 10:40:40 wieck Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -99,12 +99,12 @@ static Oid IndexGetRelation(Oid indexId);
9999
* ----------------------------------------------------------------
100100
*/
101101
staticFormData_pg_attributesysatts[]= {
102-
{0, {"ctid"},TIDOID,0,6,-1,0,-1,-1,'\0','\0','i','\0','\0'},
103-
{0, {"oid"},OIDOID,0,4,-2,0,-1,-1,'\001','\0','i','\0','\0'},
104-
{0, {"xmin"},XIDOID,0,4,-3,0,-1,-1,'\001','\0','i','\0','\0'},
105-
{0, {"cmin"},CIDOID,0,4,-4,0,-1,-1,'\001','\0','i','\0','\0'},
106-
{0, {"xmax"},XIDOID,0,4,-5,0,-1,-1,'\001','\0','i','\0','\0'},
107-
{0, {"cmax"},CIDOID,0,4,-6,0,-1,-1,'\001','\0','i','\0','\0'},
102+
{0, {"ctid"},TIDOID,0,6,-1,0,-1,-1,'\0','p','\0','i','\0','\0'},
103+
{0, {"oid"},OIDOID,0,4,-2,0,-1,-1,'\001','p','\0','i','\0','\0'},
104+
{0, {"xmin"},XIDOID,0,4,-3,0,-1,-1,'\001','p','\0','i','\0','\0'},
105+
{0, {"cmin"},CIDOID,0,4,-4,0,-1,-1,'\001','p','\0','i','\0','\0'},
106+
{0, {"xmax"},XIDOID,0,4,-5,0,-1,-1,'\001','p','\0','i','\0','\0'},
107+
{0, {"cmax"},CIDOID,0,4,-6,0,-1,-1,'\001','p','\0','i','\0','\0'},
108108
};
109109

110110
/* ----------------------------------------------------------------
@@ -186,6 +186,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
186186
funcTupDesc->attrs[0]->attbyval= ((Form_pg_type)GETSTRUCT(tuple))->typbyval;
187187
funcTupDesc->attrs[0]->attcacheoff=-1;
188188
funcTupDesc->attrs[0]->atttypmod=-1;
189+
funcTupDesc->attrs[0]->attstorage='p';
189190
funcTupDesc->attrs[0]->attalign= ((Form_pg_type)GETSTRUCT(tuple))->typalign;
190191

191192
/*
@@ -328,6 +329,7 @@ ConstructTupleDescriptor(Oid heapoid,
328329
((Form_pg_type)GETSTRUCT(tup))->typbyval;
329330
((Form_pg_attribute)to)->attlen=
330331
((Form_pg_type)GETSTRUCT(tup))->typlen;
332+
((Form_pg_attribute)to)->attstorage='p';
331333
((Form_pg_attribute)to)->attalign=
332334
((Form_pg_type)GETSTRUCT(tup))->typalign;
333335
((Form_pg_attribute)to)->atttypmod=IndexKeyType->typmod;

‎src/backend/commands/command.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.61 1999/12/16 22:19:41 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.62 1999/12/20 10:40:41 wieck Exp $
1111
*
1212
* NOTES
1313
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -455,6 +455,7 @@ PerformAddAttribute(char *relationName,
455455
attribute->attbyval=tform->typbyval;
456456
attribute->attnelems=attnelems;
457457
attribute->attisset= (bool) (tform->typtype=='c');
458+
attribute->attstorage='p';
458459
attribute->attalign=tform->typalign;
459460
attribute->attnotnull= false;
460461
attribute->atthasdef= (colDef->raw_default!=NULL||

‎src/backend/executor/execUtils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.50 1999/11/07 23:08:06 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.51 1999/12/20 10:40:42 wieck Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -564,6 +564,7 @@ ExecSetTypeInfo(int index,
564564
att->attcacheoff=-1;
565565
att->atttypmod=-1;
566566
att->attisset= false;
567+
att->attstorage='p';
567568
att->attalign=attalign;
568569
}
569570

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp