mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Cleanup of source files where 'return' or 'var =' is alone on a line.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.36 1999/02/02 03:44:17 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.37 1999/02/03 21:16:02 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -257,22 +257,19 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
|
||||
* To do this I get the info from pg_index, re-build the FunctInfo if
|
||||
* I have to, and add a new index with a temporary name.
|
||||
*/
|
||||
Old_pg_index_Tuple =
|
||||
SearchSysCacheTuple(INDEXRELID,
|
||||
Old_pg_index_Tuple = SearchSysCacheTuple(INDEXRELID,
|
||||
ObjectIdGetDatum(RelationGetRelid(OldIndex)),
|
||||
0, 0, 0);
|
||||
|
||||
Assert(Old_pg_index_Tuple);
|
||||
Old_pg_index_Form = (Form_pg_index) GETSTRUCT(Old_pg_index_Tuple);
|
||||
|
||||
Old_pg_index_relation_Tuple =
|
||||
SearchSysCacheTuple(RELOID,
|
||||
Old_pg_index_relation_Tuple = SearchSysCacheTuple(RELOID,
|
||||
ObjectIdGetDatum(RelationGetRelid(OldIndex)),
|
||||
0, 0, 0);
|
||||
|
||||
Assert(Old_pg_index_relation_Tuple);
|
||||
Old_pg_index_relation_Form =
|
||||
(Form_pg_class) GETSTRUCT(Old_pg_index_relation_Tuple);
|
||||
Old_pg_index_relation_Form = (Form_pg_class) GETSTRUCT(Old_pg_index_relation_Tuple);
|
||||
|
||||
/* Set the name. */
|
||||
NewIndexName = palloc(NAMEDATALEN); /* XXX */
|
||||
@@ -297,8 +294,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
|
||||
FIgetnArgs(finfo) = natts;
|
||||
FIgetProcOid(finfo) = Old_pg_index_Form->indproc;
|
||||
|
||||
pg_proc_Tuple =
|
||||
SearchSysCacheTuple(PROOID,
|
||||
pg_proc_Tuple = SearchSysCacheTuple(PROOID,
|
||||
ObjectIdGetDatum(Old_pg_index_Form->indproc),
|
||||
0, 0, 0);
|
||||
|
||||
@@ -357,8 +353,7 @@ rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex)
|
||||
|
||||
LocalHeapTuple.t_self = ScanResult->heap_iptr;
|
||||
heap_fetch(LocalOldHeap, SnapshotNow, &LocalHeapTuple, &LocalBuffer);
|
||||
OIDNewHeapInsert =
|
||||
heap_insert(LocalNewHeap, &LocalHeapTuple);
|
||||
OIDNewHeapInsert = heap_insert(LocalNewHeap, &LocalHeapTuple);
|
||||
pfree(ScanResult);
|
||||
ReleaseBuffer(LocalBuffer);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.35 1998/12/18 09:10:18 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.36 1999/02/03 21:16:02 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The PortalExecutorHeapMemory crap needs to be eliminated
|
||||
@@ -131,8 +131,7 @@ PerformPortalFetch(char *name,
|
||||
*/
|
||||
context = MemoryContextSwitchTo((MemoryContext) PortalGetHeapMemory(portal));
|
||||
|
||||
AssertState(context ==
|
||||
(MemoryContext) PortalGetHeapMemory(GetPortalByName(NULL)));
|
||||
AssertState(context == (MemoryContext) PortalGetHeapMemory(GetPortalByName(NULL)));
|
||||
|
||||
/* ----------------
|
||||
* setup "feature" to tell the executor what direction and
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.70 1999/02/02 03:44:18 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.71 1999/02/03 21:16:03 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -537,10 +537,8 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
if (n_indices > 0)
|
||||
{
|
||||
has_index = true;
|
||||
itupdescArr =
|
||||
(TupleDesc *) palloc(n_indices * sizeof(TupleDesc));
|
||||
pgIndexP =
|
||||
(Form_pg_index *) palloc(n_indices * sizeof(Form_pg_index));
|
||||
itupdescArr = (TupleDesc *) palloc(n_indices * sizeof(TupleDesc));
|
||||
pgIndexP = (Form_pg_index *) palloc(n_indices * sizeof(Form_pg_index));
|
||||
indexNatts = (int *) palloc(n_indices * sizeof(int));
|
||||
finfo = (FuncIndexInfo *) palloc(n_indices * sizeof(FuncIndexInfo));
|
||||
finfoP = (FuncIndexInfo **) palloc(n_indices * sizeof(FuncIndexInfo *));
|
||||
@@ -549,8 +547,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
for (i = 0; i < n_indices; i++)
|
||||
{
|
||||
itupdescArr[i] = RelationGetDescr(index_rels[i]);
|
||||
pgIndexTup =
|
||||
SearchSysCacheTuple(INDEXRELID,
|
||||
pgIndexTup = SearchSysCacheTuple(INDEXRELID,
|
||||
ObjectIdGetDatum(RelationGetRelid(index_rels[i])),
|
||||
0, 0, 0);
|
||||
Assert(pgIndexTup);
|
||||
@@ -689,8 +686,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
done = 1;
|
||||
else
|
||||
{
|
||||
values[i] =
|
||||
(Datum) (*fmgr_faddr(&in_functions[i])) (string,
|
||||
values[i] = (Datum) (*fmgr_faddr(&in_functions[i])) (string,
|
||||
elements[i],
|
||||
typmod[i]);
|
||||
|
||||
@@ -1008,13 +1004,11 @@ GetIndexRelations(Oid main_relation_oid,
|
||||
while (HeapTupleIsValid(tuple = heap_getnext(scandesc, 0)))
|
||||
{
|
||||
|
||||
index_relation_oid =
|
||||
(Oid) DatumGetInt32(heap_getattr(tuple, 2,
|
||||
index_relation_oid = (Oid) DatumGetInt32(heap_getattr(tuple, 2,
|
||||
tupDesc, &isnull));
|
||||
if (index_relation_oid == main_relation_oid)
|
||||
{
|
||||
scan->index_rel_oid =
|
||||
(Oid) DatumGetInt32(heap_getattr(tuple,
|
||||
scan->index_rel_oid = (Oid) DatumGetInt32(heap_getattr(tuple,
|
||||
Anum_pg_index_indexrelid,
|
||||
tupDesc, &isnull));
|
||||
(*n_indices)++;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.38 1999/02/02 03:44:19 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.39 1999/02/03 21:16:03 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -275,13 +275,11 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||
* form name, type and constraints
|
||||
*/
|
||||
attributeName = (attribute->attname).data;
|
||||
tuple =
|
||||
SearchSysCacheTuple(TYPOID,
|
||||
tuple = SearchSysCacheTuple(TYPOID,
|
||||
ObjectIdGetDatum(attribute->atttypid),
|
||||
0, 0, 0);
|
||||
Assert(HeapTupleIsValid(tuple));
|
||||
attributeType =
|
||||
(((Form_pg_type) GETSTRUCT(tuple))->typname).data;
|
||||
attributeType = (((Form_pg_type) GETSTRUCT(tuple))->typname).data;
|
||||
|
||||
/*
|
||||
* check validity
|
||||
@@ -468,8 +466,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
break;
|
||||
|
||||
lnext(current) =
|
||||
lconsi(((Form_pg_inherits)
|
||||
lnext(current) = lconsi(((Form_pg_inherits)
|
||||
GETSTRUCT(tuple))->inhparent,
|
||||
NIL);
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.32 1999/02/03 20:15:20 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.33 1999/02/03 21:16:04 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -172,8 +172,7 @@ DefineIndex(char *heapRelationName,
|
||||
|
||||
strcpy(FIgetname(&fInfo), funcIndex->name);
|
||||
|
||||
attributeNumberA =
|
||||
(AttrNumber *) palloc(nargs * sizeof attributeNumberA[0]);
|
||||
attributeNumberA = (AttrNumber *) palloc(nargs * sizeof attributeNumberA[0]);
|
||||
|
||||
classObjectId = (Oid *) palloc(sizeof classObjectId[0]);
|
||||
|
||||
@@ -194,8 +193,7 @@ DefineIndex(char *heapRelationName,
|
||||
attributeNumberA = (AttrNumber *) palloc(numberOfAttributes *
|
||||
sizeof attributeNumberA[0]);
|
||||
|
||||
classObjectId =
|
||||
(Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]);
|
||||
classObjectId = (Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]);
|
||||
|
||||
NormIndexAttrs(attributeList, attributeNumberA,
|
||||
classObjectId, relationId);
|
||||
@@ -306,11 +304,9 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
|
||||
predInfo->pred = (Node *) cnfPred;
|
||||
predInfo->oldPred = oldPred;
|
||||
|
||||
attributeNumberA =
|
||||
(AttrNumber *) palloc(numberOfAttributes *
|
||||
attributeNumberA = (AttrNumber *) palloc(numberOfAttributes *
|
||||
sizeof attributeNumberA[0]);
|
||||
classObjectId =
|
||||
(Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]);
|
||||
classObjectId = (Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]);
|
||||
|
||||
|
||||
for (i = 0; i < numberOfAttributes; i++)
|
||||
|
@@ -611,8 +611,7 @@ ExecBRInsertTriggers(Relation rel, HeapTuple trigtuple)
|
||||
int i;
|
||||
|
||||
SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
|
||||
SaveTriggerData->tg_event =
|
||||
TRIGGER_EVENT_INSERT | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE;
|
||||
SaveTriggerData->tg_event = TRIGGER_EVENT_INSERT | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE;
|
||||
SaveTriggerData->tg_relation = rel;
|
||||
SaveTriggerData->tg_newtuple = NULL;
|
||||
for (i = 0; i < ntrigs; i++)
|
||||
@@ -672,8 +671,7 @@ ExecBRDeleteTriggers(EState *estate, ItemPointer tupleid)
|
||||
return false;
|
||||
|
||||
SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
|
||||
SaveTriggerData->tg_event =
|
||||
TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE;
|
||||
SaveTriggerData->tg_event = TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE;
|
||||
SaveTriggerData->tg_relation = rel;
|
||||
SaveTriggerData->tg_newtuple = NULL;
|
||||
for (i = 0; i < ntrigs; i++)
|
||||
@@ -708,8 +706,7 @@ ExecARDeleteTriggers(EState *estate, ItemPointer tupleid)
|
||||
Assert(trigtuple != NULL);
|
||||
|
||||
SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
|
||||
SaveTriggerData->tg_event =
|
||||
TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW;
|
||||
SaveTriggerData->tg_event = TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW;
|
||||
SaveTriggerData->tg_relation = rel;
|
||||
SaveTriggerData->tg_newtuple = NULL;
|
||||
for (i = 0; i < ntrigs; i++)
|
||||
@@ -750,8 +747,7 @@ ExecBRUpdateTriggers(EState *estate, ItemPointer tupleid, HeapTuple newtuple)
|
||||
intuple = newtuple = ExecRemoveJunk(estate->es_junkFilter, newSlot);
|
||||
|
||||
SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
|
||||
SaveTriggerData->tg_event =
|
||||
TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE;
|
||||
SaveTriggerData->tg_event = TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE;
|
||||
SaveTriggerData->tg_relation = rel;
|
||||
for (i = 0; i < ntrigs; i++)
|
||||
{
|
||||
@@ -785,8 +781,7 @@ ExecARUpdateTriggers(EState *estate, ItemPointer tupleid, HeapTuple newtuple)
|
||||
Assert(trigtuple != NULL);
|
||||
|
||||
SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
|
||||
SaveTriggerData->tg_event =
|
||||
TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW;
|
||||
SaveTriggerData->tg_event = TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW;
|
||||
SaveTriggerData->tg_relation = rel;
|
||||
for (i = 0; i < ntrigs; i++)
|
||||
{
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.93 1999/01/17 06:18:18 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.94 1999/02/03 21:16:04 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -434,8 +434,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
|
||||
attr_cnt = tcnt;
|
||||
}
|
||||
|
||||
vacrelstats->vacattrstats =
|
||||
(VacAttrStats *) palloc(attr_cnt * sizeof(VacAttrStats));
|
||||
vacrelstats->vacattrstats = (VacAttrStats *) palloc(attr_cnt * sizeof(VacAttrStats));
|
||||
|
||||
for (i = 0; i < attr_cnt; i++)
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: view.c,v 1.30 1999/02/02 03:44:20 momjian Exp $
|
||||
* $Id: view.c,v 1.31 1999/02/03 21:16:06 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -165,17 +165,13 @@ DefineViewRules(char *viewName, Query *viewParse)
|
||||
|
||||
#endif
|
||||
|
||||
retrieve_rule =
|
||||
FormViewRetrieveRule(viewName, viewParse);
|
||||
retrieve_rule = FormViewRetrieveRule(viewName, viewParse);
|
||||
|
||||
#ifdef NOTYET
|
||||
|
||||
replace_rule =
|
||||
FormViewReplaceRule(viewName, viewParse);
|
||||
append_rule =
|
||||
FormViewAppendRule(viewName, viewParse);
|
||||
delete_rule =
|
||||
FormViewDeleteRule(viewName, viewParse);
|
||||
replace_rule = FormViewReplaceRule(viewName, viewParse);
|
||||
append_rule = FormViewAppendRule(viewName, viewParse);
|
||||
delete_rule = FormViewDeleteRule(viewName, viewParse);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -233,11 +229,9 @@ UpdateRangeTableOfViewParse(char *viewName, Query *viewParse)
|
||||
* create the 2 new range table entries and form the new range
|
||||
* table... CURRENT first, then NEW....
|
||||
*/
|
||||
rt_entry1 =
|
||||
addRangeTableEntry(NULL, (char *) viewName, "*CURRENT*",
|
||||
rt_entry1 = addRangeTableEntry(NULL, (char *) viewName, "*CURRENT*",
|
||||
FALSE, FALSE);
|
||||
rt_entry2 =
|
||||
addRangeTableEntry(NULL, (char *) viewName, "*NEW*",
|
||||
rt_entry2 = addRangeTableEntry(NULL, (char *) viewName, "*NEW*",
|
||||
FALSE, FALSE);
|
||||
new_rt = lcons(rt_entry2, old_rt);
|
||||
new_rt = lcons(rt_entry1, new_rt);
|
||||
|
Reference in New Issue
Block a user