diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-09-08 02:41:22 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-09-08 02:41:22 +0000 |
commit | 319dbfa7364721d3343af03a7ce063c2a2c9d385 (patch) | |
tree | a2146fe02c49ce1e497b7c287dfcaa367a703ae4 /src/backend/access/index/istrat.c | |
parent | a90f12fd9d6886da4f0734288496361a304d3882 (diff) |
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
Diffstat (limited to 'src/backend/access/index/istrat.c')
-rw-r--r-- | src/backend/access/index/istrat.c | 166 |
1 files changed, 83 insertions, 83 deletions
diff --git a/src/backend/access/index/istrat.c b/src/backend/access/index/istrat.c index 35158c22170..9cc9c06e98f 100644 --- a/src/backend/access/index/istrat.c +++ b/src/backend/access/index/istrat.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.10 1997/09/07 04:38:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.11 1997/09/08 02:20:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ #include <fmgr.h> #ifndef NO_ASSERT_CHECKING -static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation); +static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation); static bool StrategyExpressionIsValid(StrategyExpression expression, StrategyNumber maxStrategy); @@ -68,7 +68,7 @@ StrategyTermIsValid(StrategyTerm term, * Assumes that the index strategy number is valid. * Bounds checking should be done outside this routine. */ -static ScanKey +static ScanKey StrategyMapGetScanKeyEntry(StrategyMap map, StrategyNumber strategyNumber) { @@ -122,7 +122,7 @@ AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber, * StrategyOperatorIsValid * ---------------- */ -static bool +static bool StrategyOperatorIsValid(StrategyOperator operator, StrategyNumber maxStrategy) { @@ -136,11 +136,11 @@ StrategyOperatorIsValid(StrategyOperator operator, * StrategyTermIsValid * ---------------- */ -static bool +static bool StrategyTermIsValid(StrategyTerm term, StrategyNumber maxStrategy) { - Index index; + Index index; if (!PointerIsValid(term) || term->degree == 0) return false; @@ -162,11 +162,11 @@ StrategyTermIsValid(StrategyTerm term, * StrategyExpressionIsValid * ---------------- */ -static bool +static bool StrategyExpressionIsValid(StrategyExpression expression, StrategyNumber maxStrategy) { - StrategyTerm *termP; + StrategyTerm *termP; if (!PointerIsValid(expression)) return true; @@ -186,10 +186,10 @@ StrategyExpressionIsValid(StrategyExpression expression, * StrategyEvaluationIsValid * ---------------- */ -static bool +static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation) { - Index index; + Index index; if (!PointerIsValid(evaluation) || !StrategyNumberIsValid(evaluation->maxStrategy) || @@ -219,17 +219,17 @@ StrategyEvaluationIsValid(StrategyEvaluation evaluation) * StrategyTermEvaluate * ---------------- */ -static bool +static bool StrategyTermEvaluate(StrategyTerm term, StrategyMap map, Datum left, Datum right) { - Index index; - long tmpres = 0; - bool result = 0; + Index index; + long tmpres = 0; + bool result = 0; StrategyOperator operator; - ScanKey entry; + ScanKey entry; for (index = 0, operator = &term->operatorData[0]; index < term->degree; index += 1, operator += 1) @@ -241,29 +241,29 @@ StrategyTermEvaluate(StrategyTerm term, switch (operator->flags ^ entry->sk_flags) { - case 0x0: - tmpres = (long) FMGR_PTR2(entry->sk_func, entry->sk_procedure, - left, right); - break; - - case SK_NEGATE: - tmpres = (long) !FMGR_PTR2(entry->sk_func, entry->sk_procedure, - left, right); - break; - - case SK_COMMUTE: - tmpres = (long) FMGR_PTR2(entry->sk_func, entry->sk_procedure, - right, left); - break; - - case SK_NEGATE | SK_COMMUTE: - tmpres = (long) !FMGR_PTR2(entry->sk_func, entry->sk_procedure, - right, left); - break; - - default: - elog(FATAL, "StrategyTermEvaluate: impossible case %d", - operator->flags ^ entry->sk_flags); + case 0x0: + tmpres = (long) FMGR_PTR2(entry->sk_func, entry->sk_procedure, + left, right); + break; + + case SK_NEGATE: + tmpres = (long) !FMGR_PTR2(entry->sk_func, entry->sk_procedure, + left, right); + break; + + case SK_COMMUTE: + tmpres = (long) FMGR_PTR2(entry->sk_func, entry->sk_procedure, + right, left); + break; + + case SK_NEGATE | SK_COMMUTE: + tmpres = (long) !FMGR_PTR2(entry->sk_func, entry->sk_procedure, + right, left); + break; + + default: + elog(FATAL, "StrategyTermEvaluate: impossible case %d", + operator->flags ^ entry->sk_flags); } result = (bool) tmpres; @@ -285,11 +285,11 @@ RelationGetStrategy(Relation relation, StrategyEvaluation evaluation, RegProcedure procedure) { - StrategyNumber strategy; - StrategyMap strategyMap; - ScanKey entry; - Index index; - int numattrs; + StrategyNumber strategy; + StrategyMap strategyMap; + ScanKey entry; + Index index; + int numattrs; Assert(RelationIsValid(relation)); numattrs = RelationGetNumberOfAttributes(relation); @@ -325,23 +325,23 @@ RelationGetStrategy(Relation relation, switch (entry->sk_flags & (SK_NEGATE | SK_COMMUTE)) { - case 0x0: - return strategy; + case 0x0: + return strategy; - case SK_NEGATE: - strategy = evaluation->negateTransform->strategy[strategy - 1]; - break; + case SK_NEGATE: + strategy = evaluation->negateTransform->strategy[strategy - 1]; + break; - case SK_COMMUTE: - strategy = evaluation->commuteTransform->strategy[strategy - 1]; - break; + case SK_COMMUTE: + strategy = evaluation->commuteTransform->strategy[strategy - 1]; + break; - case SK_NEGATE | SK_COMMUTE: - strategy = evaluation->negateCommuteTransform->strategy[strategy - 1]; - break; + case SK_NEGATE | SK_COMMUTE: + strategy = evaluation->negateCommuteTransform->strategy[strategy - 1]; + break; - default: - elog(FATAL, "RelationGetStrategy: impossible case %d", entry->sk_flags); + default: + elog(FATAL, "RelationGetStrategy: impossible case %d", entry->sk_flags); } @@ -368,11 +368,11 @@ RelationInvokeStrategy(Relation relation, Datum left, Datum right) { - StrategyNumber newStrategy; - StrategyMap strategyMap; - ScanKey entry; + StrategyNumber newStrategy; + StrategyMap strategyMap; + ScanKey entry; StrategyTermData termData; - int numattrs; + int numattrs; Assert(RelationIsValid(relation)); Assert(relation->rd_rel->relkind == RELKIND_INDEX); /* XXX use accessor */ @@ -453,12 +453,12 @@ RelationInvokeStrategy(Relation relation, if (PointerIsValid(evaluation->expression[strategy - 1])) { - StrategyTerm *termP; + StrategyTerm *termP; termP = &evaluation->expression[strategy - 1]->term[0]; while (PointerIsValid(*termP)) { - Index index; + Index index; for (index = 0; index < (*termP)->degree; index += 1) { @@ -499,9 +499,9 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation, Oid operatorObjectId, ScanKey entry) { - HeapScanDesc scan; - ScanKeyData scanKeyData; - HeapTuple tuple; + HeapScanDesc scan; + ScanKeyData scanKeyData; + HeapTuple tuple; ScanKeyEntryInitialize(&scanKeyData, 0, ObjectIdAttributeNumber, @@ -547,15 +547,15 @@ IndexSupportInitialize(IndexStrategy indexStrategy, StrategyNumber maxSupportNumber, AttrNumber maxAttributeNumber) { - Relation relation; - Relation operatorRelation; - HeapScanDesc scan; - HeapTuple tuple; - ScanKeyData entry[2]; - StrategyMap map; - AttrNumber attributeNumber; - int attributeIndex; - Oid operatorClassObjectId[MaxIndexAttributeNumber]; + Relation relation; + Relation operatorRelation; + HeapScanDesc scan; + HeapTuple tuple; + ScanKeyData entry[2]; + StrategyMap map; + AttrNumber attributeNumber; + int attributeIndex; + Oid operatorClassObjectId[MaxIndexAttributeNumber]; maxStrategyNumber = AMStrategies(maxStrategyNumber); @@ -575,7 +575,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy, */ for (attributeIndex = 0; attributeIndex < maxAttributeNumber; attributeIndex++) { - IndexTupleForm iform; + IndexTupleForm iform; iform = (IndexTupleForm) GETSTRUCT(tuple); @@ -614,9 +614,9 @@ IndexSupportInitialize(IndexStrategy indexStrategy, attributeNumber--) { - int16 support; - Form_pg_amproc form; - RegProcedure *loc; + int16 support; + Form_pg_amproc form; + RegProcedure *loc; loc = &indexSupport[((attributeNumber - 1) * maxSupportNumber)]; @@ -659,7 +659,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy, attributeNumber--) { - StrategyNumber strategy; + StrategyNumber strategy; entry[1].sk_argument = ObjectIdGetDatum(operatorClassObjectId[attributeNumber - 1]); @@ -676,7 +676,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy, while (tuple = heap_getnext(scan, 0, (Buffer *) NULL), HeapTupleIsValid(tuple)) { - Form_pg_amop form; + Form_pg_amop form; form = (Form_pg_amop) GETSTRUCT(tuple); @@ -702,9 +702,9 @@ IndexStrategyDisplay(IndexStrategy indexStrategy, StrategyNumber numberOfStrategies, int numberOfAttributes) { - StrategyMap strategyMap; - AttrNumber attributeNumber; - StrategyNumber strategyNumber; + StrategyMap strategyMap; + AttrNumber attributeNumber; + StrategyNumber strategyNumber; for (attributeNumber = 1; attributeNumber <= numberOfAttributes; attributeNumber += 1) |