summaryrefslogtreecommitdiff
path: root/src/backend/catalog
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog')
-rw-r--r--src/backend/catalog/aclchk.c52
-rw-r--r--src/backend/catalog/catalog.c6
-rw-r--r--src/backend/catalog/heap.c53
-rw-r--r--src/backend/catalog/index.c118
-rw-r--r--src/backend/catalog/indexing.c18
-rw-r--r--src/backend/catalog/pg_aggregate.c4
-rw-r--r--src/backend/catalog/pg_operator.c25
-rw-r--r--src/backend/catalog/pg_proc.c3
-rw-r--r--src/backend/catalog/pg_type.c26
9 files changed, 149 insertions, 156 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 3d778d26099..d432269a36e 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.15 1998/09/01 03:21:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.16 1998/09/01 04:27:27 momjian Exp $
*
* NOTES
* See acl.h.
@@ -185,7 +185,7 @@ get_grosysid(char *groname)
tuple = SearchSysCacheTuple(GRONAME,
PointerGetDatum(groname),
- 0, 0, 0);
+ 0, 0, 0);
if (HeapTupleIsValid(tuple))
id = ((Form_pg_group) GETSTRUCT(tuple))->grosysid;
else
@@ -201,7 +201,7 @@ get_groname(AclId grosysid)
tuple = SearchSysCacheTuple(GROSYSID,
ObjectIdGetDatum(grosysid),
- 0, 0, 0);
+ 0, 0, 0);
if (HeapTupleIsValid(tuple))
name = (((Form_pg_group) GETSTRUCT(tuple))->groname).data;
else
@@ -229,13 +229,13 @@ in_group(AclId uid, AclId gid)
}
tuple = SearchSysCacheTuple(GROSYSID,
ObjectIdGetDatum(gid),
- 0, 0, 0);
+ 0, 0, 0);
if (HeapTupleIsValid(tuple) &&
!heap_attisnull(tuple, Anum_pg_group_grolist))
{
tmp = (IdList *) heap_getattr(tuple,
Anum_pg_group_grolist,
- RelationGetDescr(relation),
+ RelationGetDescr(relation),
(bool *) NULL);
/* XXX make me a function */
num = IDLIST_NUM(tmp);
@@ -369,7 +369,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_aclcheck: user \"%s\" not found",
usename);
@@ -420,8 +420,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
#ifndef ACLDEBUG
tuple = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(relname),
- 0, 0, 0);
+ PointerGetDatum(relname),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
elog(ERROR, "pg_aclcheck: class \"%s\" not found",
@@ -450,10 +450,10 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
relation = heap_openr(RelationRelationName);
ownerId = (int4) heap_getattr(tuple,
- Anum_pg_class_relowner,
- RelationGetDescr(relation),
- (bool *) NULL);
- acl = aclownerdefault(relname, (AclId)ownerId);
+ Anum_pg_class_relowner,
+ RelationGetDescr(relation),
+ (bool *) NULL);
+ acl = aclownerdefault(relname, (AclId) ownerId);
}
#else
{ /* This is why the syscache is great... */
@@ -469,14 +469,14 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
return ACLCHECK_NO_CLASS;
}
tuple = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(relname),
- 0, 0, 0);
+ PointerGetDatum(relname),
+ 0, 0, 0);
if (HeapTupleIsValid(tuple) &&
!heap_attisnull(tuple, Anum_pg_class_relacl))
{
tmp = (Acl *) heap_getattr(tuple,
Anum_pg_class_relacl,
- RelationGetDescr(relation),
+ RelationGetDescr(relation),
(bool *) NULL);
acl = makeacl(ACL_NUM(tmp));
memmove((char *) acl, (char *) tmp, ACL_SIZE(tmp));
@@ -501,7 +501,7 @@ pg_ownercheck(char *usename,
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_ownercheck: user \"%s\" not found",
usename);
@@ -520,7 +520,7 @@ pg_ownercheck(char *usename,
}
tuple = SearchSysCacheTuple(cacheid, PointerGetDatum(value),
- 0, 0, 0);
+ 0, 0, 0);
switch (cacheid)
{
case OPROID:
@@ -568,7 +568,7 @@ pg_func_ownercheck(char *usename,
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_func_ownercheck: user \"%s\" not found",
usename);
@@ -587,10 +587,10 @@ pg_func_ownercheck(char *usename,
}
tuple = SearchSysCacheTuple(PRONAME,
- PointerGetDatum(funcname),
- Int32GetDatum(nargs),
- PointerGetDatum(arglist),
- 0);
+ PointerGetDatum(funcname),
+ Int32GetDatum(nargs),
+ PointerGetDatum(arglist),
+ 0);
if (!HeapTupleIsValid(tuple))
func_error("pg_func_ownercheck", funcname, nargs, arglist, NULL);
@@ -610,7 +610,7 @@ pg_aggr_ownercheck(char *usename,
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_aggr_ownercheck: user \"%s\" not found",
usename);
@@ -629,9 +629,9 @@ pg_aggr_ownercheck(char *usename,
}
tuple = SearchSysCacheTuple(AGGNAME,
- PointerGetDatum(aggname),
- ObjectIdGetDatum(basetypeID),
- 0, 0);
+ PointerGetDatum(aggname),
+ ObjectIdGetDatum(basetypeID),
+ 0, 0);
if (!HeapTupleIsValid(tuple))
agg_error("pg_aggr_ownercheck", aggname, basetypeID);
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 5db4be03109..cb9d5ff8365 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.17 1998/09/01 03:21:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.18 1998/09/01 04:27:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -174,7 +174,7 @@ fillatt(TupleDesc tupleDesc)
for (i = 0; i < natts;)
{
tuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum((*attributeP)->atttypid),
+ ObjectIdGetDatum((*attributeP)->atttypid),
0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
@@ -193,7 +193,7 @@ fillatt(TupleDesc tupleDesc)
*/
if (!(*attributeP)->attisset)
{
- typp = (Form_pg_type) GETSTRUCT(tuple); /* XXX */
+ typp = (Form_pg_type) GETSTRUCT(tuple); /* XXX */
(*attributeP)->attlen = typp->typlen;
(*attributeP)->attbyval = typp->typbyval;
}
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index d6c252f7baf..bcac9479788 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -7,12 +7,12 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.63 1998/09/01 03:21:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.64 1998/09/01 04:27:29 momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
* heap_create_with_catalog() - Create a cataloged relation
- * heap_destroy_with_catalog() - Removes named relation from catalogs
+ * heap_destroy_with_catalog() - Removes named relation from catalogs
*
* NOTES
* this code taken from access/heap/create.c, which contains
@@ -65,10 +65,9 @@
#include <string.h>
#endif
-static void
-AddPgRelationTuple(Relation pg_class_desc,
- Relation new_rel_desc, Oid new_rel_oid, unsigned natts,
- char relkind);
+static void AddPgRelationTuple(Relation pg_class_desc,
+ Relation new_rel_desc, Oid new_rel_oid, unsigned natts,
+ char relkind);
static void AddToTempRelList(Relation r);
static void DeletePgAttributeTuples(Relation rel);
static void DeletePgRelationTuple(Relation rel);
@@ -317,7 +316,7 @@ heap_create(char *name,
* ----------------
*/
- rel->rd_tmpunlinked = TRUE; /* change once table is created */
+ rel->rd_tmpunlinked = TRUE; /* change once table is created */
rel->rd_fd = (File) smgrcreate(DEFAULT_SMGR, rel);
rel->rd_tmpunlinked = FALSE;
@@ -479,8 +478,8 @@ RelationAlreadyExists(Relation pg_class_desc, char *relname)
if (!IsBootstrapProcessingMode())
{
tup = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(relname),
- 0, 0, 0);
+ PointerGetDatum(relname),
+ 0, 0, 0);
if (HeapTupleIsValid(tup))
return true;
else
@@ -878,7 +877,7 @@ RelationRemoveInheritance(Relation relation)
HeapScanDesc scan;
ScanKeyData entry;
bool found = false;
-
+
/* ----------------
* open pg_inherits
* ----------------
@@ -892,7 +891,7 @@ RelationRemoveInheritance(Relation relation)
*/
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_inherits_inhparent,
F_OIDEQ,
- ObjectIdGetDatum(RelationGetRelid(relation)));
+ ObjectIdGetDatum(RelationGetRelid(relation)));
scan = heap_beginscan(catalogRelation,
false,
@@ -972,10 +971,10 @@ RelationRemoveIndexes(Relation relation)
ScanKeyData entry;
indexRelation = heap_openr(IndexRelationName);
-
+
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_index_indrelid,
F_OIDEQ,
- ObjectIdGetDatum(RelationGetRelid(relation)));
+ ObjectIdGetDatum(RelationGetRelid(relation)));
scan = heap_beginscan(indexRelation,
false,
@@ -1008,8 +1007,8 @@ DeletePgRelationTuple(Relation rel)
pg_class_desc = heap_openr(RelationRelationName);
tup = SearchSysCacheTupleCopy(RELOID,
- ObjectIdGetDatum(rel->rd_att->attrs[0]->attrelid),
- 0, 0, 0);
+ ObjectIdGetDatum(rel->rd_att->attrs[0]->attrelid),
+ 0, 0, 0);
if (!HeapTupleIsValid(tup))
{
heap_close(pg_class_desc);
@@ -1023,7 +1022,7 @@ DeletePgRelationTuple(Relation rel)
*/
heap_delete(pg_class_desc, &tup->t_ctid);
pfree(tup);
-
+
heap_close(pg_class_desc);
}
@@ -1038,7 +1037,7 @@ DeletePgAttributeTuples(Relation rel)
Relation pg_attribute_desc;
HeapTuple tup;
int2 attnum;
-
+
/* ----------------
* open pg_attribute
* ----------------
@@ -1052,19 +1051,19 @@ DeletePgAttributeTuples(Relation rel)
RelationSetLockForWrite(pg_attribute_desc);
for (attnum = FirstLowInvalidHeapAttributeNumber + 1;
- attnum <= rel->rd_att->natts;
- attnum++)
+ attnum <= rel->rd_att->natts;
+ attnum++)
{
if (HeapTupleIsValid(tup = SearchSysCacheTupleCopy(ATTNUM,
- ObjectIdGetDatum(RelationGetRelid(rel)),
- Int16GetDatum(attnum),
- 0, 0)))
+ ObjectIdGetDatum(RelationGetRelid(rel)),
+ Int16GetDatum(attnum),
+ 0, 0)))
{
heap_delete(pg_attribute_desc, &tup->t_ctid);
pfree(tup);
}
}
-
+
/* ----------------
* Release the write lock
* ----------------
@@ -1107,9 +1106,9 @@ DeletePgTypeTuple(Relation rel)
* ----------------
*/
ScanKeyEntryInitialize(&key, 0,
- Anum_pg_type_typrelid,
- F_OIDEQ,
- ObjectIdGetDatum(RelationGetRelid(rel)));
+ Anum_pg_type_typrelid,
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
pg_type_scan = heap_beginscan(pg_type_desc,
0,
@@ -1470,7 +1469,7 @@ start:;
}
}
else if ((exprType(expr) != atp->atttypid)
- && !IS_BINARY_COMPATIBLE(exprType(expr), atp->atttypid))
+ && !IS_BINARY_COMPATIBLE(exprType(expr), atp->atttypid))
elog(ERROR, "DEFAULT: type mismatched");
adbin = nodeToString(expr);
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index ad8725a2549..7d98a51bc5c 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.59 1998/09/01 03:21:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.60 1998/09/01 04:27:31 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -65,32 +65,28 @@
/* non-export function prototypes */
static Oid
-RelationNameGetObjectId(char *relationName, Relation pg_class);
+ RelationNameGetObjectId(char *relationName, Relation pg_class);
static Oid GetHeapRelationOid(char *heapRelationName, char *indexRelationName);
static TupleDesc BuildFuncTupleDesc(FuncIndexInfo *funcInfo);
-static TupleDesc
-ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
+static TupleDesc ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
List *attributeList,
int numatts, AttrNumber *attNums);
static void ConstructIndexReldesc(Relation indexRelation, Oid amoid);
static Oid UpdateRelationRelation(Relation indexRelation);
-static void
-InitializeAttributeOids(Relation indexRelation,
+static void InitializeAttributeOids(Relation indexRelation,
int numatts,
Oid indexoid);
static void
AppendAttributeTuples(Relation indexRelation, int numatts);
-static void
-UpdateIndexRelation(Oid indexoid, Oid heapoid,
+static void UpdateIndexRelation(Oid indexoid, Oid heapoid,
FuncIndexInfo *funcInfo, int natts,
- AttrNumber *attNums, Oid *classOids, Node *predicate,
+ AttrNumber *attNums, Oid *classOids, Node *predicate,
List *attributeList, bool islossy, bool unique);
-static void
-DefaultBuild(Relation heapRelation, Relation indexRelation,
+static void DefaultBuild(Relation heapRelation, Relation indexRelation,
int numberOfAttributes, AttrNumber *attributeNumber,
IndexStrategy indexStrategy, uint16 parameterCount,
- Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
+ Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
/* ----------------------------------------------------------------
* sysatts is a structure containing attribute tuple forms
@@ -147,12 +143,12 @@ RelationNameGetObjectId(char *relationName,
if (!IsBootstrapProcessingMode())
{
- HeapTuple tuple;
-
+ HeapTuple tuple;
+
tuple = SearchSysCacheTuple(RELNAME,
PointerGetDatum(relationName),
0, 0, 0);
-
+
if (HeapTupleIsValid(tuple))
return tuple->t_oid;
else
@@ -614,7 +610,9 @@ static void
AppendAttributeTuples(Relation indexRelation, int numatts)
{
Relation pg_attribute;
- HeapTuple init_tuple, cur_tuple = NULL, new_tuple;
+ HeapTuple init_tuple,
+ cur_tuple = NULL,
+ new_tuple;
bool hasind;
Relation idescs[Num_pg_attr_indices];
@@ -651,8 +649,8 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
value[Anum_pg_attribute_attcacheoff - 1] = Int32GetDatum(-1);
init_tuple = heap_addheader(Natts_pg_attribute,
- sizeof *(indexRelation->rd_att->attrs[0]),
- (char *) (indexRelation->rd_att->attrs[0]));
+ sizeof *(indexRelation->rd_att->attrs[0]),
+ (char *) (indexRelation->rd_att->attrs[0]));
hasind = false;
if (!IsBootstrapProcessingMode() && pg_attribute->rd_rel->relhasindex)
@@ -666,12 +664,12 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
* ----------------
*/
cur_tuple = heap_modifytuple(init_tuple,
- pg_attribute,
- value,
- nullv,
- replace);
+ pg_attribute,
+ value,
+ nullv,
+ replace);
pfree(init_tuple);
-
+
heap_insert(pg_attribute, cur_tuple);
if (hasind)
CatalogIndexInsert(idescs, Num_pg_attr_indices, pg_attribute, cur_tuple);
@@ -696,13 +694,13 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
value[Anum_pg_attribute_attnum - 1] = Int16GetDatum(i + 1);
new_tuple = heap_modifytuple(cur_tuple,
- pg_attribute,
- value,
- nullv,
- replace);
+ pg_attribute,
+ value,
+ nullv,
+ replace);
pfree(cur_tuple);
- heap_insert(pg_attribute,new_tuple);
+ heap_insert(pg_attribute, new_tuple);
if (hasind)
CatalogIndexInsert(idescs, Num_pg_attr_indices, pg_attribute, new_tuple);
@@ -711,7 +709,7 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
* so we free the original and use the copy..
* ----------------
*/
- cur_tuple = new_tuple;
+ cur_tuple = new_tuple;
}
if (cur_tuple)
@@ -898,10 +896,10 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
pg_index = heap_openr(IndexRelationName);
tuple = SearchSysCacheTuple(INDEXRELID,
- ObjectIdGetDatum(indexoid),
- 0, 0, 0);
+ ObjectIdGetDatum(indexoid),
+ 0, 0, 0);
Assert(HeapTupleIsValid(tuple));
-
+
for (i = 0; i < Natts_pg_index; i++)
{
nulls[i] = heap_attisnull(tuple, i + 1) ? 'n' : ' ';
@@ -1103,7 +1101,7 @@ index_create(char *heapRelationName,
if (!HeapTupleIsValid(proc_tup))
{
func_error("index_create", FIgetname(funcInfo),
- FIgetnArgs(funcInfo), FIgetArglist(funcInfo), NULL);
+ FIgetnArgs(funcInfo), FIgetArglist(funcInfo), NULL);
}
FIgetProcOid(funcInfo) = proc_tup->t_oid;
}
@@ -1178,7 +1176,7 @@ index_destroy(Oid indexId)
Relation attributeRelation;
HeapTuple tuple;
int16 attnum;
-
+
Assert(OidIsValid(indexId));
/* why open it here? bjm 1998/08/20 */
@@ -1206,12 +1204,12 @@ index_destroy(Oid indexId)
*/
attributeRelation = heap_openr(AttributeRelationName);
- attnum = 1; /* indexes start at 1 */
+ attnum = 1; /* indexes start at 1 */
while (HeapTupleIsValid(tuple = SearchSysCacheTupleCopy(ATTNUM,
- ObjectIdGetDatum(indexId),
- Int16GetDatum(attnum),
- 0, 0)))
+ ObjectIdGetDatum(indexId),
+ Int16GetDatum(attnum),
+ 0, 0)))
{
heap_delete(attributeRelation, &tuple->t_ctid);
pfree(tuple);
@@ -1224,15 +1222,15 @@ index_destroy(Oid indexId)
* ----------------
*/
tuple = SearchSysCacheTupleCopy(INDEXRELID,
- ObjectIdGetDatum(indexId),
- 0, 0, 0);
+ ObjectIdGetDatum(indexId),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(NOTICE, "IndexRelationDestroy: %s's INDEX tuple missing",
RelationGetRelationName(userindexRelation));
indexRelation = heap_openr(IndexRelationName);
-
+
heap_delete(indexRelation, &tuple->t_ctid);
pfree(tuple);
heap_close(indexRelation);
@@ -1281,12 +1279,12 @@ FormIndexDatum(int numberOfAttributes,
{
offset = AttrNumberGetAttrOffset(i);
- datum[offset] = PointerGetDatum(GetIndexValue(heapTuple,
- heapDescriptor,
- offset,
- attributeNumber,
- fInfo,
- &isNull));
+ datum[offset] = PointerGetDatum(GetIndexValue(heapTuple,
+ heapDescriptor,
+ offset,
+ attributeNumber,
+ fInfo,
+ &isNull));
nullv[offset] = (isNull) ? 'n' : ' ';
}
@@ -1311,7 +1309,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
Datum values[Natts_pg_class];
char nulls[Natts_pg_class];
char replace[Natts_pg_class];
- HeapScanDesc pg_class_scan = NULL;
+ HeapScanDesc pg_class_scan = NULL;
/* ----------------
* This routine handles updates for both the heap and index relation
@@ -1356,14 +1354,14 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
ScanKeyData key[1];
ScanKeyEntryInitialize(&key[0], 0,
- ObjectIdAttributeNumber,
- F_OIDEQ,
- ObjectIdGetDatum(relid));
+ ObjectIdAttributeNumber,
+ F_OIDEQ,
+ ObjectIdGetDatum(relid));
pg_class_scan = heap_beginscan(pg_class, 0, SnapshotNow, 1, key);
tuple = heap_getnext(pg_class_scan, 0);
}
-
+
if (!HeapTupleIsValid(tuple))
{
if (IsBootstrapProcessingMode())
@@ -1436,7 +1434,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
pfree(tuple);
else
heap_endscan(pg_class_scan);
-
+
heap_close(pg_class);
heap_close(whichRel);
}
@@ -1478,7 +1476,7 @@ DefaultBuild(Relation heapRelation,
AttrNumber *attributeNumber,
IndexStrategy indexStrategy, /* not used */
uint16 parameterCount, /* not used */
- Datum *parameter, /* not used */
+ Datum *parameter, /* not used */
FuncIndexInfoPtr funcInfo,
PredInfo *predInfo)
{
@@ -1543,7 +1541,7 @@ DefaultBuild(Relation heapRelation,
tupleTable = ExecCreateTupleTable(1);
slot = ExecAllocTableSlot(tupleTable);
econtext = makeNode(ExprContext);
- /* last parameter was junk being sent bjm 1998/08/17 */
+ /* last parameter was junk being sent bjm 1998/08/17 */
FillDummyExprContext(econtext, slot, heapDescriptor, InvalidBuffer);
}
else
@@ -1552,7 +1550,7 @@ DefaultBuild(Relation heapRelation,
tupleTable = 0;
slot = NULL;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
/* ----------------
* Ok, begin our scan of the base relation.
@@ -1560,7 +1558,7 @@ DefaultBuild(Relation heapRelation,
*/
scan = heap_beginscan(heapRelation, /* relation */
0, /* start at end */
- SnapshotNow,/* seeself */
+ SnapshotNow, /* seeself */
0, /* number of keys */
(ScanKey) NULL); /* scan key */
@@ -1591,7 +1589,7 @@ DefaultBuild(Relation heapRelation,
indtuples++;
continue;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -1605,7 +1603,7 @@ DefaultBuild(Relation heapRelation,
slot->val = heapTuple;
if (ExecQual((List *) predicate, econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
indtuples++;
@@ -1643,7 +1641,7 @@ DefaultBuild(Relation heapRelation,
{
#ifndef OMIT_PARTIAL_INDEX
ExecDestroyTupleTable(tupleTable, false);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
pfree(nullv);
diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c
index 8fa94148c01..ad66f892696 100644
--- a/src/backend/catalog/indexing.c
+++ b/src/backend/catalog/indexing.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.25 1998/09/01 03:21:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.26 1998/09/01 04:27:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -126,8 +126,8 @@ CatalogIndexInsert(Relation *idescs,
indexDescriptor = RelationGetDescr(idescs[i]);
pgIndexTup = SearchSysCacheTupleCopy(INDEXRELID,
- ObjectIdGetDatum(idescs[i]->rd_id),
- 0, 0, 0);
+ ObjectIdGetDatum(idescs[i]->rd_id),
+ 0, 0, 0);
Assert(pgIndexTup);
pgIndexP = (Form_pg_index) GETSTRUCT(pgIndexTup);
@@ -228,7 +228,7 @@ CatalogIndexFetchTuple(Relation heapRelation,
RetrieveIndexResult indexRes;
HeapTuple tuple = NULL;
Buffer buffer;
-
+
sd = index_beginscan(idesc, false, num_keys, skey);
while ((indexRes = index_getnext(sd, ForwardScanDirection)))
{
@@ -239,7 +239,7 @@ CatalogIndexFetchTuple(Relation heapRelation,
pfree(indexRes);
if (HeapTupleIsValid(tuple))
break;
- }
+ }
if (HeapTupleIsValid(tuple))
{
@@ -270,13 +270,13 @@ AttributeNameIndexScan(Relation heapRelation,
ScanKeyEntryInitialize(&skey[0],
(bits16) 0x0,
(AttrNumber) 1,
- (RegProcedure)F_OIDEQ,
+ (RegProcedure) F_OIDEQ,
ObjectIdGetDatum(relid));
ScanKeyEntryInitialize(&skey[1],
(bits16) 0x0,
(AttrNumber) 2,
- (RegProcedure)F_NAMEEQ,
+ (RegProcedure) F_NAMEEQ,
NameGetDatum(attname));
idesc = index_openr(AttributeNameIndex);
@@ -299,13 +299,13 @@ AttributeNumIndexScan(Relation heapRelation,
ScanKeyEntryInitialize(&skey[0],
(bits16) 0x0,
(AttrNumber) 1,
- (RegProcedure)F_OIDEQ,
+ (RegProcedure) F_OIDEQ,
ObjectIdGetDatum(relid));
ScanKeyEntryInitialize(&skey[1],
(bits16) 0x0,
(AttrNumber) 2,
- (RegProcedure)F_INT2EQ,
+ (RegProcedure) F_INT2EQ,
Int16GetDatum(attnum));
idesc = index_openr(AttributeNumIndex);
diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c
index c9370df540e..00b16c20f69 100644
--- a/src/backend/catalog/pg_aggregate.c
+++ b/src/backend/catalog/pg_aggregate.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.16 1998/09/01 03:21:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.17 1998/09/01 04:27:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -78,7 +78,7 @@ AggregateCreate(char *aggName,
Oid xret2 = InvalidOid;
Oid fret = InvalidOid;
Oid fnArgs[8];
- NameData aname;
+ NameData aname;
TupleDesc tupDesc;
MemSet(fnArgs, 0, 8 * sizeof(Oid));
diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c
index a2123fc7c54..a296c9057c2 100644
--- a/src/backend/catalog/pg_operator.c
+++ b/src/backend/catalog/pg_operator.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.28 1998/09/01 03:21:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.29 1998/09/01 04:27:36 momjian Exp $
*
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -35,28 +35,23 @@
#include <string.h>
#endif
-static Oid
-OperatorGetWithOpenRelation(Relation pg_operator_desc,
+static Oid OperatorGetWithOpenRelation(Relation pg_operator_desc,
const char *operatorName,
Oid leftObjectId,
Oid rightObjectId);
-static Oid
-OperatorGet(char *operatorName,
+static Oid OperatorGet(char *operatorName,
char *leftTypeName,
char *rightTypeName);
-static Oid
-OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
+static Oid OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
char *operatorName,
Oid leftObjectId,
Oid rightObjectId);
-static Oid
-OperatorShellMake(char *operatorName,
+static Oid OperatorShellMake(char *operatorName,
char *leftTypeName,
char *rightTypeName);
-static void
-OperatorDef(char *operatorName,
+static void OperatorDef(char *operatorName,
int definedOK,
char *leftTypeName,
char *rightTypeName,
@@ -120,7 +115,7 @@ OperatorGetWithOpenRelation(Relation pg_operator_desc,
*/
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* no cache? */
+ SnapshotSelf, /* no cache? */
3,
opKey);
@@ -475,7 +470,7 @@ OperatorDef(char *operatorName,
char *name[4];
Oid typeId[8];
int nargs;
- NameData oname;
+ NameData oname;
TupleDesc tupDesc;
static ScanKeyData opKey[3] = {
@@ -796,7 +791,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* no cache? */
+ SnapshotSelf, /* no cache? */
1,
opKey);
@@ -872,7 +867,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* no cache? */
+ SnapshotSelf, /* no cache? */
1,
opKey);
diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c
index 006286f6f75..074bda38767 100644
--- a/src/backend/catalog/pg_proc.c
+++ b/src/backend/catalog/pg_proc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.22 1998/09/01 03:21:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.23 1998/09/01 04:27:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -129,6 +129,7 @@ ProcedureCreate(char *procedureName,
if (!strcmp(languageName, "sql"))
{
+
/*
* If this call is defining a set, check if the set is already
* defined by looking to see whether this call's function text
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c
index 3375cfe591c..d9f9023f316 100644
--- a/src/backend/catalog/pg_type.c
+++ b/src/backend/catalog/pg_type.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.29 1998/09/01 03:21:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.30 1998/09/01 04:27:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,8 +33,7 @@
#include <string.h>
#endif
-static Oid
-TypeShellMakeWithOpenRelation(Relation pg_type_desc,
+static Oid TypeShellMakeWithOpenRelation(Relation pg_type_desc,
char *typeName);
/* ----------------------------------------------------------------
@@ -178,7 +177,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
*/
i = 0;
namestrcpy(&name, typeName);
- values[i++] = NameGetDatum(&name); /* 1 */
+ values[i++] = NameGetDatum(&name); /* 1 */
values[i++] = (Datum) InvalidOid; /* 2 */
values[i++] = (Datum) (int16) 0; /* 3 */
values[i++] = (Datum) (int16) 0; /* 4 */
@@ -379,17 +378,17 @@ TypeCreate(char *typeName,
* ----------------
*/
i = 0;
- namestrcpy(&name,typeName);
+ namestrcpy(&name, typeName);
values[i++] = NameGetDatum(&name); /* 1 */
values[i++] = (Datum) GetUserId(); /* 2 */
values[i++] = (Datum) internalSize; /* 3 */
values[i++] = (Datum) externalSize; /* 4 */
- values[i++] = (Datum) passedByValue;/* 5 */
+ values[i++] = (Datum) passedByValue; /* 5 */
values[i++] = (Datum) typeType; /* 6 */
values[i++] = (Datum) (bool) 1; /* 7 */
values[i++] = (Datum) typDelim; /* 8 */
values[i++] = (Datum) (typeType == 'c' ? relationOid : InvalidOid); /* 9 */
- values[i++] = (Datum) elementObjectId;/* 10 */
+ values[i++] = (Datum) elementObjectId; /* 10 */
/*
* arguments to type input and output functions must be 0
@@ -431,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_oid; /* 11 - 14 */
}
/* ----------------
@@ -444,7 +443,7 @@ TypeCreate(char *typeName,
* initialize the default value for this type.
* ----------------
*/
- values[i] = (Datum) fmgr(F_TEXTIN, /* 16 */
+ values[i] = (Datum) fmgr(F_TEXTIN, /* 16 */
PointerIsValid(defaultTypeValue)
? defaultTypeValue : "-"); /* XXX default
* typdefault */
@@ -534,8 +533,9 @@ TypeRename(char *oldTypeName, char *newTypeName)
{
Relation pg_type_desc;
Relation idescs[Num_pg_type_indices];
- HeapTuple oldtup, newtup;
-
+ HeapTuple oldtup,
+ newtup;
+
pg_type_desc = heap_openr(TypeRelationName);
oldtup = SearchSysCacheTupleCopy(TYPNAME,
@@ -547,7 +547,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
heap_close(pg_type_desc);
elog(ERROR, "TypeRename: type %s not defined", oldTypeName);
}
-
+
newtup = SearchSysCacheTuple(TYPNAME,
PointerGetDatum(newTypeName),
0, 0, 0);
@@ -557,7 +557,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
heap_close(pg_type_desc);
elog(ERROR, "TypeRename: type %s already defined", newTypeName);
}
-
+
namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
setheapoverride(true);