mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +03:00
New HeapTuple structure/interface.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.16 1998/09/01 04:27:27 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.17 1998/11/27 19:51:46 vadim Exp $
|
||||
*
|
||||
* NOTES
|
||||
* See acl.h.
|
||||
@@ -162,7 +162,7 @@ ChangeAcl(char *relname,
|
||||
tuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
|
||||
/* XXX handle index on pg_class? */
|
||||
setheapoverride(true);
|
||||
heap_replace(relation, &tuple->t_ctid, tuple);
|
||||
heap_replace(relation, &tuple->t_self, tuple);
|
||||
setheapoverride(false);
|
||||
|
||||
/* keep the catalog indices up to date */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.66 1998/11/17 14:26:39 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.67 1998/11/27 19:51:48 vadim Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* heap_create() - Create an uncataloged heap relation
|
||||
@@ -663,7 +663,7 @@ AddPgRelationTuple(Relation pg_class_desc,
|
||||
tup = heap_addheader(Natts_pg_class_fixed,
|
||||
CLASS_TUPLE_SIZE,
|
||||
(char *) new_rel_reltup);
|
||||
tup->t_oid = new_rel_oid;
|
||||
tup->t_data->t_oid = new_rel_oid;
|
||||
|
||||
/* ----------------
|
||||
* finally insert the new tuple and free it.
|
||||
@@ -929,7 +929,7 @@ RelationRemoveInheritance(Relation relation)
|
||||
|
||||
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
|
||||
{
|
||||
heap_delete(catalogRelation, &tuple->t_ctid);
|
||||
heap_delete(catalogRelation, &tuple->t_self);
|
||||
found = true;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ RelationRemoveInheritance(Relation relation)
|
||||
&entry);
|
||||
|
||||
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
|
||||
heap_delete(catalogRelation, &tuple->t_ctid);
|
||||
heap_delete(catalogRelation, &tuple->t_self);
|
||||
|
||||
heap_endscan(scan);
|
||||
heap_close(catalogRelation);
|
||||
@@ -1020,7 +1020,7 @@ DeletePgRelationTuple(Relation rel)
|
||||
* delete the relation tuple from pg_class, and finish up.
|
||||
* ----------------
|
||||
*/
|
||||
heap_delete(pg_class_desc, &tup->t_ctid);
|
||||
heap_delete(pg_class_desc, &tup->t_self);
|
||||
pfree(tup);
|
||||
|
||||
heap_close(pg_class_desc);
|
||||
@@ -1059,7 +1059,7 @@ DeletePgAttributeTuples(Relation rel)
|
||||
Int16GetDatum(attnum),
|
||||
0, 0)))
|
||||
{
|
||||
heap_delete(pg_attribute_desc, &tup->t_ctid);
|
||||
heap_delete(pg_attribute_desc, &tup->t_self);
|
||||
pfree(tup);
|
||||
}
|
||||
}
|
||||
@@ -1138,7 +1138,7 @@ DeletePgTypeTuple(Relation rel)
|
||||
* stonebraker about this. -cim 6/19/90
|
||||
* ----------------
|
||||
*/
|
||||
typoid = tup->t_oid;
|
||||
typoid = tup->t_data->t_oid;
|
||||
|
||||
pg_attribute_desc = heap_openr(AttributeRelationName);
|
||||
|
||||
@@ -1183,7 +1183,7 @@ DeletePgTypeTuple(Relation rel)
|
||||
* we release the read lock on pg_type. -mer 13 Aug 1991
|
||||
* ----------------
|
||||
*/
|
||||
heap_delete(pg_type_desc, &tup->t_ctid);
|
||||
heap_delete(pg_type_desc, &tup->t_self);
|
||||
|
||||
heap_endscan(pg_type_scan);
|
||||
heap_close(pg_type_desc);
|
||||
@@ -1604,7 +1604,7 @@ RemoveAttrDefault(Relation rel)
|
||||
adscan = heap_beginscan(adrel, 0, SnapshotNow, 1, &key);
|
||||
|
||||
while (HeapTupleIsValid(tup = heap_getnext(adscan, 0)))
|
||||
heap_delete(adrel, &tup->t_ctid);
|
||||
heap_delete(adrel, &tup->t_self);
|
||||
|
||||
heap_endscan(adscan);
|
||||
|
||||
@@ -1631,7 +1631,7 @@ RemoveRelCheck(Relation rel)
|
||||
rcscan = heap_beginscan(rcrel, 0, SnapshotNow, 1, &key);
|
||||
|
||||
while (HeapTupleIsValid(tup = heap_getnext(rcscan, 0)))
|
||||
heap_delete(rcrel, &tup->t_ctid);
|
||||
heap_delete(rcrel, &tup->t_self);
|
||||
|
||||
heap_endscan(rcscan);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.63 1998/09/10 15:32:16 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.64 1998/11/27 19:51:49 vadim Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -150,7 +150,7 @@ RelationNameGetObjectId(char *relationName,
|
||||
0, 0, 0);
|
||||
|
||||
if (HeapTupleIsValid(tuple))
|
||||
return tuple->t_oid;
|
||||
return tuple->t_data->t_oid;
|
||||
else
|
||||
return InvalidOid;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ RelationNameGetObjectId(char *relationName,
|
||||
if (!HeapTupleIsValid(pg_class_tuple))
|
||||
relationObjectId = InvalidOid;
|
||||
else
|
||||
relationObjectId = pg_class_tuple->t_oid;
|
||||
relationObjectId = pg_class_tuple->t_data->t_oid;
|
||||
|
||||
/* ----------------
|
||||
* cleanup and return results
|
||||
@@ -412,7 +412,7 @@ ConstructTupleDescriptor(Oid heapoid,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "create index: type '%s' undefined",
|
||||
IndexKeyType->name);
|
||||
((Form_pg_attribute) to)->atttypid = tup->t_oid;
|
||||
((Form_pg_attribute) to)->atttypid = tup->t_data->t_oid;
|
||||
((Form_pg_attribute) to)->attbyval =
|
||||
((Form_pg_type) GETSTRUCT(tup))->typbyval;
|
||||
((Form_pg_attribute) to)->attlen =
|
||||
@@ -558,7 +558,7 @@ UpdateRelationRelation(Relation indexRelation)
|
||||
* company.
|
||||
* ----------------
|
||||
*/
|
||||
tuple->t_oid = RelationGetRelid(indexRelation);
|
||||
tuple->t_data->t_oid = RelationGetRelid(indexRelation);
|
||||
heap_insert(pg_class, tuple);
|
||||
|
||||
/*
|
||||
@@ -575,7 +575,7 @@ UpdateRelationRelation(Relation indexRelation)
|
||||
CatalogCloseIndices(Num_pg_class_indices, idescs);
|
||||
}
|
||||
|
||||
tupleOid = tuple->t_oid;
|
||||
tupleOid = tuple->t_data->t_oid;
|
||||
pfree(tuple);
|
||||
heap_close(pg_class);
|
||||
|
||||
@@ -913,7 +913,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
|
||||
|
||||
newtup = heap_modifytuple(tuple, pg_index, values, nulls, replace);
|
||||
|
||||
heap_replace(pg_index, &newtup->t_ctid, newtup);
|
||||
heap_replace(pg_index, &newtup->t_self, newtup);
|
||||
|
||||
pfree(newtup);
|
||||
heap_close(pg_index);
|
||||
@@ -1104,7 +1104,7 @@ index_create(char *heapRelationName,
|
||||
func_error("index_create", FIgetname(funcInfo),
|
||||
FIgetnArgs(funcInfo), FIgetArglist(funcInfo), NULL);
|
||||
}
|
||||
FIgetProcOid(funcInfo) = proc_tup->t_oid;
|
||||
FIgetProcOid(funcInfo) = proc_tup->t_data->t_oid;
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
@@ -1195,7 +1195,7 @@ index_destroy(Oid indexId)
|
||||
|
||||
AssertState(HeapTupleIsValid(tuple));
|
||||
|
||||
heap_delete(relationRelation, &tuple->t_ctid);
|
||||
heap_delete(relationRelation, &tuple->t_self);
|
||||
pfree(tuple);
|
||||
heap_close(relationRelation);
|
||||
|
||||
@@ -1212,7 +1212,7 @@ index_destroy(Oid indexId)
|
||||
Int16GetDatum(attnum),
|
||||
0, 0)))
|
||||
{
|
||||
heap_delete(attributeRelation, &tuple->t_ctid);
|
||||
heap_delete(attributeRelation, &tuple->t_self);
|
||||
pfree(tuple);
|
||||
attnum++;
|
||||
}
|
||||
@@ -1232,7 +1232,7 @@ index_destroy(Oid indexId)
|
||||
|
||||
indexRelation = heap_openr(IndexRelationName);
|
||||
|
||||
heap_delete(indexRelation, &tuple->t_ctid);
|
||||
heap_delete(indexRelation, &tuple->t_self);
|
||||
pfree(tuple);
|
||||
heap_close(indexRelation);
|
||||
|
||||
@@ -1424,7 +1424,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
|
||||
values[Anum_pg_class_relhasindex - 1] = CharGetDatum(hasindex);
|
||||
|
||||
newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
|
||||
heap_replace(pg_class, &tuple->t_ctid, newtup);
|
||||
heap_replace(pg_class, &tuple->t_self, newtup);
|
||||
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
|
||||
CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
|
||||
CatalogCloseIndices(Num_pg_class_indices, idescs);
|
||||
@@ -1626,10 +1626,10 @@ DefaultBuild(Relation heapRelation,
|
||||
datum,
|
||||
nullv);
|
||||
|
||||
indexTuple->t_tid = heapTuple->t_ctid;
|
||||
indexTuple->t_tid = heapTuple->t_self;
|
||||
|
||||
insertResult = index_insert(indexRelation, datum, nullv,
|
||||
&(heapTuple->t_ctid), heapRelation);
|
||||
&(heapTuple->t_self), heapRelation);
|
||||
|
||||
if (insertResult)
|
||||
pfree(insertResult);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.33 1998/10/02 05:10:10 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.34 1998/11/27 19:51:50 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -161,7 +161,7 @@ CatalogIndexInsert(Relation *idescs,
|
||||
finfoP);
|
||||
|
||||
indexRes = index_insert(idescs[i], datum, nulls,
|
||||
&heapTuple->t_ctid, heapRelation);
|
||||
&heapTuple->t_self, heapRelation);
|
||||
if (indexRes)
|
||||
pfree(indexRes);
|
||||
|
||||
@@ -228,30 +228,32 @@ CatalogIndexFetchTuple(Relation heapRelation,
|
||||
ScanKey skey,
|
||||
int16 num_keys)
|
||||
{
|
||||
IndexScanDesc sd;
|
||||
IndexScanDesc sd;
|
||||
RetrieveIndexResult indexRes;
|
||||
HeapTuple tuple = NULL;
|
||||
Buffer buffer;
|
||||
HeapTupleData tuple;
|
||||
HeapTuple result = NULL;
|
||||
Buffer buffer;
|
||||
|
||||
sd = index_beginscan(idesc, false, num_keys, skey);
|
||||
tuple.t_data = NULL;
|
||||
while ((indexRes = index_getnext(sd, ForwardScanDirection)))
|
||||
{
|
||||
tuple = heap_fetch(heapRelation, SnapshotNow, &indexRes->heap_iptr,
|
||||
&buffer);
|
||||
tuple.t_self = indexRes->heap_iptr;
|
||||
heap_fetch(heapRelation, SnapshotNow, &tuple, &buffer);
|
||||
pfree(indexRes);
|
||||
if (HeapTupleIsValid(tuple))
|
||||
if (tuple.t_data != NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
if (HeapTupleIsValid(tuple))
|
||||
if (tuple.t_data != NULL)
|
||||
{
|
||||
tuple = heap_copytuple(tuple);
|
||||
result = heap_copytuple(&tuple);
|
||||
ReleaseBuffer(buffer);
|
||||
}
|
||||
|
||||
index_endscan(sd);
|
||||
pfree(sd);
|
||||
return tuple;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.17 1998/09/01 04:27:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.18 1998/11/27 19:51:50 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ AggregateCreate(char *aggName,
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "AggregateCreate: Type '%s' undefined", aggbasetypeName);
|
||||
xbase = tup->t_oid;
|
||||
xbase = tup->t_data->t_oid;
|
||||
|
||||
if (aggtransfn1Name)
|
||||
{
|
||||
@@ -105,7 +105,7 @@ AggregateCreate(char *aggName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "AggregateCreate: Type '%s' undefined",
|
||||
aggtransfn1typeName);
|
||||
xret1 = tup->t_oid;
|
||||
xret1 = tup->t_data->t_oid;
|
||||
|
||||
fnArgs[0] = xret1;
|
||||
fnArgs[1] = xbase;
|
||||
@@ -121,7 +121,7 @@ AggregateCreate(char *aggName,
|
||||
elog(ERROR, "AggregateCreate: return type of '%s' is not '%s'",
|
||||
aggtransfn1Name,
|
||||
aggtransfn1typeName);
|
||||
xfn1 = tup->t_oid;
|
||||
xfn1 = tup->t_data->t_oid;
|
||||
if (!OidIsValid(xfn1) || !OidIsValid(xret1) ||
|
||||
!OidIsValid(xbase))
|
||||
elog(ERROR, "AggregateCreate: bogus function '%s'", aggfinalfnName);
|
||||
@@ -135,7 +135,7 @@ AggregateCreate(char *aggName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "AggregateCreate: Type '%s' undefined",
|
||||
aggtransfn2typeName);
|
||||
xret2 = tup->t_oid;
|
||||
xret2 = tup->t_data->t_oid;
|
||||
|
||||
fnArgs[0] = xret2;
|
||||
fnArgs[1] = 0;
|
||||
@@ -150,7 +150,7 @@ AggregateCreate(char *aggName,
|
||||
if (((Form_pg_proc) GETSTRUCT(tup))->prorettype != xret2)
|
||||
elog(ERROR, "AggregateCreate: return type of '%s' is not '%s'",
|
||||
aggtransfn2Name, aggtransfn2typeName);
|
||||
xfn2 = tup->t_oid;
|
||||
xfn2 = tup->t_data->t_oid;
|
||||
if (!OidIsValid(xfn2) || !OidIsValid(xret2))
|
||||
elog(ERROR, "AggregateCreate: bogus function '%s'", aggfinalfnName);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ AggregateCreate(char *aggName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "AggregateCreate: '%s'('%s','%s') does not exist",
|
||||
aggfinalfnName, aggtransfn1typeName, aggtransfn2typeName);
|
||||
ffn = tup->t_oid;
|
||||
ffn = tup->t_data->t_oid;
|
||||
proc = (Form_pg_proc) GETSTRUCT(tup);
|
||||
fret = proc->prorettype;
|
||||
if (!OidIsValid(ffn) || !OidIsValid(fret))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.29 1998/09/01 04:27:36 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.30 1998/11/27 19:51:50 vadim Exp $
|
||||
*
|
||||
* NOTES
|
||||
* these routines moved here from commands/define.c and somewhat cleaned up.
|
||||
@@ -125,7 +125,7 @@ OperatorGetWithOpenRelation(Relation pg_operator_desc,
|
||||
* ----------------
|
||||
*/
|
||||
tup = heap_getnext(pg_operator_scan, 0);
|
||||
operatorObjectId = HeapTupleIsValid(tup) ? tup->t_oid : InvalidOid;
|
||||
operatorObjectId = HeapTupleIsValid(tup) ? tup->t_data->t_oid : InvalidOid;
|
||||
|
||||
/* ----------------
|
||||
* close the scan and return the oid.
|
||||
@@ -279,7 +279,7 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
|
||||
* ----------------
|
||||
*/
|
||||
heap_insert(pg_operator_desc, tup);
|
||||
operatorObjectId = tup->t_oid;
|
||||
operatorObjectId = tup->t_data->t_oid;
|
||||
|
||||
/* ----------------
|
||||
* free the tuple and return the operator oid
|
||||
@@ -413,7 +413,7 @@ OperatorShellMake(char *operatorName,
|
||||
* if the operator shell is being filled in
|
||||
* access the catalog in order to get a valid buffer
|
||||
* create a tuple using ModifyHeapTuple
|
||||
* get the t_ctid from the modified tuple and call RelationReplaceHeapTuple
|
||||
* get the t_self from the modified tuple and call RelationReplaceHeapTuple
|
||||
* else if a new operator is being created
|
||||
* create a tuple using heap_formtuple
|
||||
* call heap_insert
|
||||
@@ -544,7 +544,7 @@ OperatorDef(char *operatorName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
func_error("OperatorDef", procedureName, nargs, typeId, NULL);
|
||||
|
||||
values[Anum_pg_operator_oprcode - 1] = ObjectIdGetDatum(tup->t_oid);
|
||||
values[Anum_pg_operator_oprcode - 1] = ObjectIdGetDatum(tup->t_data->t_oid);
|
||||
values[Anum_pg_operator_oprresult - 1] =
|
||||
ObjectIdGetDatum(((Form_pg_proc)
|
||||
GETSTRUCT(tup))->prorettype);
|
||||
@@ -569,7 +569,7 @@ OperatorDef(char *operatorName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
func_error("OperatorDef", restrictionName, 5, typeId, NULL);
|
||||
|
||||
values[Anum_pg_operator_oprrest - 1] = ObjectIdGetDatum(tup->t_oid);
|
||||
values[Anum_pg_operator_oprrest - 1] = ObjectIdGetDatum(tup->t_data->t_oid);
|
||||
}
|
||||
else
|
||||
values[Anum_pg_operator_oprrest - 1] = ObjectIdGetDatum(InvalidOid);
|
||||
@@ -595,7 +595,7 @@ OperatorDef(char *operatorName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
func_error("OperatorDef", joinName, 5, typeId, NULL);
|
||||
|
||||
values[Anum_pg_operator_oprjoin - 1] = ObjectIdGetDatum(tup->t_oid);
|
||||
values[Anum_pg_operator_oprjoin - 1] = ObjectIdGetDatum(tup->t_data->t_oid);
|
||||
}
|
||||
else
|
||||
values[Anum_pg_operator_oprjoin - 1] = ObjectIdGetDatum(InvalidOid);
|
||||
@@ -685,7 +685,7 @@ OperatorDef(char *operatorName,
|
||||
/* last three fields were filled in first */
|
||||
|
||||
/*
|
||||
* If we are adding to an operator shell, get its t_ctid
|
||||
* If we are adding to an operator shell, get its t_self
|
||||
*/
|
||||
pg_operator_desc = heap_openr(OperatorRelationName);
|
||||
|
||||
@@ -711,7 +711,7 @@ OperatorDef(char *operatorName,
|
||||
replaces);
|
||||
|
||||
setheapoverride(true);
|
||||
heap_replace(pg_operator_desc, &tup->t_ctid, tup);
|
||||
heap_replace(pg_operator_desc, &tup->t_self, tup);
|
||||
setheapoverride(false);
|
||||
}
|
||||
else
|
||||
@@ -725,7 +725,7 @@ OperatorDef(char *operatorName,
|
||||
tup = heap_formtuple(tupDesc, values, nulls);
|
||||
|
||||
heap_insert(pg_operator_desc, tup);
|
||||
operatorObjectId = tup->t_oid;
|
||||
operatorObjectId = tup->t_data->t_oid;
|
||||
}
|
||||
|
||||
heap_close(pg_operator_desc);
|
||||
@@ -830,7 +830,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
||||
replaces);
|
||||
|
||||
setheapoverride(true);
|
||||
heap_replace(pg_operator_desc, &tup->t_ctid, tup);
|
||||
heap_replace(pg_operator_desc, &tup->t_self, tup);
|
||||
setheapoverride(false);
|
||||
|
||||
}
|
||||
@@ -855,7 +855,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
||||
replaces);
|
||||
|
||||
setheapoverride(true);
|
||||
heap_replace(pg_operator_desc, &tup->t_ctid, tup);
|
||||
heap_replace(pg_operator_desc, &tup->t_self, tup);
|
||||
setheapoverride(false);
|
||||
|
||||
values[Anum_pg_operator_oprcom - 1] = (Datum) NULL;
|
||||
@@ -884,7 +884,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
||||
replaces);
|
||||
|
||||
setheapoverride(true);
|
||||
heap_replace(pg_operator_desc, &tup->t_ctid, tup);
|
||||
heap_replace(pg_operator_desc, &tup->t_self, tup);
|
||||
setheapoverride(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.23 1998/09/01 04:27:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.24 1998/11/27 19:51:51 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -144,7 +144,7 @@ ProcedureCreate(char *procedureName,
|
||||
0, 0, 0);
|
||||
pfree(prosrctext);
|
||||
if (HeapTupleIsValid(tup))
|
||||
return tup->t_oid;
|
||||
return tup->t_data->t_oid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ ProcedureCreate(char *procedureName,
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "ProcedureCreate: no such language %s", languageName);
|
||||
|
||||
languageObjectId = tup->t_oid;
|
||||
languageObjectId = tup->t_data->t_oid;
|
||||
|
||||
if (strcmp(returnTypeName, "opaque") == 0)
|
||||
{
|
||||
@@ -276,5 +276,5 @@ ProcedureCreate(char *procedureName,
|
||||
CatalogCloseIndices(Num_pg_proc_indices, idescs);
|
||||
}
|
||||
heap_close(rel);
|
||||
return tup->t_oid;
|
||||
return tup->t_data->t_oid;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.30 1998/09/01 04:27:39 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.31 1998/11/27 19:51:51 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ TypeGetWithOpenRelation(Relation pg_type_desc,
|
||||
heap_endscan(scan);
|
||||
*defined = (bool) ((Form_pg_type) GETSTRUCT(tup))->typisdefined;
|
||||
|
||||
return tup->t_oid;
|
||||
return tup->t_data->t_oid;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
@@ -212,7 +212,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
|
||||
* ----------------
|
||||
*/
|
||||
heap_insert(pg_type_desc, tup);
|
||||
typoid = tup->t_oid;
|
||||
typoid = tup->t_data->t_oid;
|
||||
|
||||
if (RelationGetForm(pg_type_desc)->relhasindex)
|
||||
{
|
||||
@@ -430,7 +430,7 @@ TypeCreate(char *typeName,
|
||||
func_error("TypeCreate", procname, 1, argList, NULL);
|
||||
}
|
||||
|
||||
values[i++] = (Datum) tup->t_oid; /* 11 - 14 */
|
||||
values[i++] = (Datum) tup->t_data->t_oid; /* 11 - 14 */
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
@@ -484,10 +484,10 @@ TypeCreate(char *typeName,
|
||||
replaces);
|
||||
|
||||
setheapoverride(true);
|
||||
heap_replace(pg_type_desc, &tup->t_ctid, tup);
|
||||
heap_replace(pg_type_desc, &tup->t_self, tup);
|
||||
setheapoverride(false);
|
||||
|
||||
typeObjectId = tup->t_oid;
|
||||
typeObjectId = tup->t_data->t_oid;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -499,7 +499,7 @@ TypeCreate(char *typeName,
|
||||
|
||||
heap_insert(pg_type_desc, tup);
|
||||
|
||||
typeObjectId = tup->t_oid;
|
||||
typeObjectId = tup->t_data->t_oid;
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
@@ -561,7 +561,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
|
||||
namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
|
||||
|
||||
setheapoverride(true);
|
||||
heap_replace(pg_type_desc, &oldtup->t_ctid, oldtup);
|
||||
heap_replace(pg_type_desc, &oldtup->t_self, oldtup);
|
||||
setheapoverride(false);
|
||||
|
||||
/* update the system catalog indices */
|
||||
|
||||
Reference in New Issue
Block a user