mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Required catalog changes for extended LONG attribute storage.
Jan
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.57 1999/11/22 17:55:52 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.58 1999/12/20 10:40:38 wieck Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@@ -322,6 +322,7 @@ TupleDescInitEntry(TupleDesc desc,
|
||||
att->atttypid = InvalidOid;
|
||||
att->attlen = (int16) 0;
|
||||
att->attbyval = (bool) 0;
|
||||
att->attstorage = 'p';
|
||||
att->attalign = 'i';
|
||||
return false;
|
||||
}
|
||||
@@ -366,11 +367,22 @@ TupleDescInitEntry(TupleDesc desc,
|
||||
|
||||
att->attlen = typeLen(t);
|
||||
att->attbyval = typeByVal(t);
|
||||
att->attstorage = 'p';
|
||||
}
|
||||
else
|
||||
{
|
||||
att->attlen = typeForm->typlen;
|
||||
att->attbyval = typeForm->typbyval;
|
||||
/*
|
||||
* This will enable ALL variable size attributes of user
|
||||
* relations for automatic move off into "secondary" relation.
|
||||
* Jan
|
||||
*/
|
||||
#ifdef LONG_ATTRIBUTES_NOW_IMPLEMENTED_FOR_ALL_VARLENA_DATA_TYPES
|
||||
att->attcanlong = (att->attlen == -1) ? 'e' : 'p';
|
||||
#else
|
||||
att->attstorage = 'p';
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -401,6 +413,7 @@ TupleDescMakeSelfReference(TupleDesc desc,
|
||||
att->atttypid = TypeShellMake(relname);
|
||||
att->attlen = typeLen(t);
|
||||
att->attbyval = typeByVal(t);
|
||||
att->attstorage = 'p';
|
||||
att->attnelems = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.73 1999/12/16 22:19:37 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.74 1999/12/20 10:40:39 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -562,6 +562,7 @@ DefineAttr(char *name, char *type, int attnum)
|
||||
attrtypes[attnum]->attnum = 1 + attnum; /* fillatt */
|
||||
attlen = attrtypes[attnum]->attlen = Ap->am_typ.typlen;
|
||||
attrtypes[attnum]->attbyval = Ap->am_typ.typbyval;
|
||||
attrtypes[attnum]->attstorage = 'p';
|
||||
attrtypes[attnum]->attalign = Ap->am_typ.typalign;
|
||||
}
|
||||
else
|
||||
@@ -572,6 +573,7 @@ DefineAttr(char *name, char *type, int attnum)
|
||||
printf("<%s %s> ", NameStr(attrtypes[attnum]->attname), type);
|
||||
attrtypes[attnum]->attnum = 1 + attnum; /* fillatt */
|
||||
attlen = attrtypes[attnum]->attlen = Procid[typeoid].len;
|
||||
attrtypes[attnum]->attstorage = 'p';
|
||||
|
||||
/*
|
||||
* Cheat like mad to fill in these items from the length only.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.113 1999/12/16 22:19:38 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.114 1999/12/20 10:40:40 wieck Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -105,32 +105,32 @@ static void RemoveStatistics(Relation rel);
|
||||
|
||||
static FormData_pg_attribute a1 = {
|
||||
0xffffffff, {"ctid"}, TIDOID, 0, sizeof(ItemPointerData),
|
||||
SelfItemPointerAttributeNumber, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'
|
||||
SelfItemPointerAttributeNumber, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0'
|
||||
};
|
||||
|
||||
static FormData_pg_attribute a2 = {
|
||||
0xffffffff, {"oid"}, OIDOID, 0, sizeof(Oid),
|
||||
ObjectIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
|
||||
ObjectIdAttributeNumber, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'
|
||||
};
|
||||
|
||||
static FormData_pg_attribute a3 = {
|
||||
0xffffffff, {"xmin"}, XIDOID, 0, sizeof(TransactionId),
|
||||
MinTransactionIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
|
||||
MinTransactionIdAttributeNumber, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'
|
||||
};
|
||||
|
||||
static FormData_pg_attribute a4 = {
|
||||
0xffffffff, {"cmin"}, CIDOID, 0, sizeof(CommandId),
|
||||
MinCommandIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
|
||||
MinCommandIdAttributeNumber, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'
|
||||
};
|
||||
|
||||
static FormData_pg_attribute a5 = {
|
||||
0xffffffff, {"xmax"}, XIDOID, 0, sizeof(TransactionId),
|
||||
MaxTransactionIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
|
||||
MaxTransactionIdAttributeNumber, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'
|
||||
};
|
||||
|
||||
static FormData_pg_attribute a6 = {
|
||||
0xffffffff, {"cmax"}, CIDOID, 0, sizeof(CommandId),
|
||||
MaxCommandIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
|
||||
MaxCommandIdAttributeNumber, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'
|
||||
};
|
||||
|
||||
static Form_pg_attribute HeapAtt[] = {&a1, &a2, &a3, &a4, &a5, &a6};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.100 1999/12/16 22:19:39 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.101 1999/12/20 10:40:40 wieck Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -99,12 +99,12 @@ static Oid IndexGetRelation(Oid indexId);
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
static FormData_pg_attribute sysatts[] = {
|
||||
{0, {"ctid"}, TIDOID, 0, 6, -1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
|
||||
{0, {"oid"}, OIDOID, 0, 4, -2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
|
||||
{0, {"xmin"}, XIDOID, 0, 4, -3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
|
||||
{0, {"cmin"}, CIDOID, 0, 4, -4, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
|
||||
{0, {"xmax"}, XIDOID, 0, 4, -5, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
|
||||
{0, {"cmax"}, CIDOID, 0, 4, -6, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
|
||||
{0, {"ctid"}, TIDOID, 0, 6, -1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0'},
|
||||
{0, {"oid"}, OIDOID, 0, 4, -2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'},
|
||||
{0, {"xmin"}, XIDOID, 0, 4, -3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'},
|
||||
{0, {"cmin"}, CIDOID, 0, 4, -4, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'},
|
||||
{0, {"xmax"}, XIDOID, 0, 4, -5, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'},
|
||||
{0, {"cmax"}, CIDOID, 0, 4, -6, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0'},
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
@@ -186,6 +186,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
|
||||
funcTupDesc->attrs[0]->attbyval = ((Form_pg_type) GETSTRUCT(tuple))->typbyval;
|
||||
funcTupDesc->attrs[0]->attcacheoff = -1;
|
||||
funcTupDesc->attrs[0]->atttypmod = -1;
|
||||
funcTupDesc->attrs[0]->attstorage = 'p';
|
||||
funcTupDesc->attrs[0]->attalign = ((Form_pg_type) GETSTRUCT(tuple))->typalign;
|
||||
|
||||
/*
|
||||
@@ -328,6 +329,7 @@ ConstructTupleDescriptor(Oid heapoid,
|
||||
((Form_pg_type) GETSTRUCT(tup))->typbyval;
|
||||
((Form_pg_attribute) to)->attlen =
|
||||
((Form_pg_type) GETSTRUCT(tup))->typlen;
|
||||
((Form_pg_attribute) to)->attstorage = 'p';
|
||||
((Form_pg_attribute) to)->attalign =
|
||||
((Form_pg_type) GETSTRUCT(tup))->typalign;
|
||||
((Form_pg_attribute) to)->atttypmod = IndexKeyType->typmod;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.61 1999/12/16 22:19:41 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.62 1999/12/20 10:40:41 wieck Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The PortalExecutorHeapMemory crap needs to be eliminated
|
||||
@@ -455,6 +455,7 @@ PerformAddAttribute(char *relationName,
|
||||
attribute->attbyval = tform->typbyval;
|
||||
attribute->attnelems = attnelems;
|
||||
attribute->attisset = (bool) (tform->typtype == 'c');
|
||||
attribute->attstorage = 'p';
|
||||
attribute->attalign = tform->typalign;
|
||||
attribute->attnotnull = false;
|
||||
attribute->atthasdef = (colDef->raw_default != NULL ||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.50 1999/11/07 23:08:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.51 1999/12/20 10:40:42 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -564,6 +564,7 @@ ExecSetTypeInfo(int index,
|
||||
att->attcacheoff = -1;
|
||||
att->atttypmod = -1;
|
||||
att->attisset = false;
|
||||
att->attstorage = 'p';
|
||||
att->attalign = attalign;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user