diff options
author | Bruce Momjian <bruce@momjian.us> | 2010-02-26 02:01:40 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2010-02-26 02:01:40 +0000 |
commit | 65e806cba1f0f154d51caa7478e7192ce58d1056 (patch) | |
tree | 99a656d7b4ec6d038d4c24e07fadf75db4c37e79 /src/backend/executor/execUtils.c | |
parent | 16040575a04486d8e0823b4e304f4933144baf90 (diff) | |
download | postgresql-65e806cba1f0f154d51caa7478e7192ce58d1056.tar.gz postgresql-65e806cba1f0f154d51caa7478e7192ce58d1056.zip |
pgindent run for 9.0
Diffstat (limited to 'src/backend/executor/execUtils.c')
-rw-r--r-- | src/backend/executor/execUtils.c | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 151e50b63f9..de78719c4c5 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.170 2010/02/08 04:33:54 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.171 2010/02/26 02:00:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -342,7 +342,7 @@ CreateStandaloneExprContext(void) * any previously computed pass-by-reference expression result will go away! * * If isCommit is false, we are being called in error cleanup, and should - * not call callbacks but only release memory. (It might be better to call + * not call callbacks but only release memory. (It might be better to call * the callbacks and pass the isCommit flag to them, but that would require * more invasive code changes than currently seems justified.) * @@ -1078,9 +1078,9 @@ ExecInsertIndexTuples(TupleTableSlot *slot, checkUnique = UNIQUE_CHECK_PARTIAL; satisfiesConstraint = - index_insert(indexRelation, /* index relation */ - values, /* array of index Datums */ - isnull, /* null flags */ + index_insert(indexRelation, /* index relation */ + values, /* array of index Datums */ + isnull, /* null flags */ tupleid, /* tid of heap tuple */ heapRelation, /* heap relation */ checkUnique); /* type of uniqueness check to do */ @@ -1088,7 +1088,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot, /* * If the index has an associated exclusion constraint, check that. * This is simpler than the process for uniqueness checks since we - * always insert first and then check. If the constraint is deferred, + * always insert first and then check. If the constraint is deferred, * we check now anyway, but don't throw error on violation; instead * we'll queue a recheck event. * @@ -1098,7 +1098,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot, */ if (indexInfo->ii_ExclusionOps != NULL) { - bool errorOK = !indexRelation->rd_index->indimmediate; + bool errorOK = !indexRelation->rd_index->indimmediate; satisfiesConstraint = check_exclusion_constraint(heapRelation, @@ -1152,23 +1152,23 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, Datum *values, bool *isnull, EState *estate, bool newIndex, bool errorOK) { - Oid *constr_procs = indexInfo->ii_ExclusionProcs; - uint16 *constr_strats = indexInfo->ii_ExclusionStrats; - int index_natts = index->rd_index->indnatts; - IndexScanDesc index_scan; - HeapTuple tup; - ScanKeyData scankeys[INDEX_MAX_KEYS]; - SnapshotData DirtySnapshot; - int i; - bool conflict; - bool found_self; - ExprContext *econtext; + Oid *constr_procs = indexInfo->ii_ExclusionProcs; + uint16 *constr_strats = indexInfo->ii_ExclusionStrats; + int index_natts = index->rd_index->indnatts; + IndexScanDesc index_scan; + HeapTuple tup; + ScanKeyData scankeys[INDEX_MAX_KEYS]; + SnapshotData DirtySnapshot; + int i; + bool conflict; + bool found_self; + ExprContext *econtext; TupleTableSlot *existing_slot; TupleTableSlot *save_scantuple; /* - * If any of the input values are NULL, the constraint check is assumed - * to pass (i.e., we assume the operators are strict). + * If any of the input values are NULL, the constraint check is assumed to + * pass (i.e., we assume the operators are strict). */ for (i = 0; i < index_natts; i++) { @@ -1177,8 +1177,8 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, } /* - * Search the tuples that are in the index for any violations, - * including tuples that aren't visible yet. + * Search the tuples that are in the index for any violations, including + * tuples that aren't visible yet. */ InitDirtySnapshot(DirtySnapshot); @@ -1205,8 +1205,8 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, econtext->ecxt_scantuple = existing_slot; /* - * May have to restart scan from this point if a potential - * conflict is found. + * May have to restart scan from this point if a potential conflict is + * found. */ retry: conflict = false; @@ -1217,11 +1217,11 @@ retry: while ((tup = index_getnext(index_scan, ForwardScanDirection)) != NULL) { - TransactionId xwait; + TransactionId xwait; Datum existing_values[INDEX_MAX_KEYS]; bool existing_isnull[INDEX_MAX_KEYS]; - char *error_new; - char *error_existing; + char *error_new; + char *error_existing; /* * Ignore the entry for the tuple we're trying to check. @@ -1239,7 +1239,7 @@ retry: * Extract the index column values and isnull flags from the existing * tuple. */ - ExecStoreTuple(tup, existing_slot, InvalidBuffer, false); + ExecStoreTuple(tup, existing_slot, InvalidBuffer, false); FormIndexDatum(indexInfo, existing_slot, estate, existing_values, existing_isnull); @@ -1251,12 +1251,13 @@ retry: existing_values, existing_isnull, values)) - continue; /* tuple doesn't actually match, so no conflict */ + continue; /* tuple doesn't actually match, so no + * conflict */ } /* - * At this point we have either a conflict or a potential conflict. - * If we're not supposed to raise error, just return the fact of the + * At this point we have either a conflict or a potential conflict. If + * we're not supposed to raise error, just return the fact of the * potential conflict without waiting to see if it's real. */ if (errorOK) @@ -1267,7 +1268,7 @@ retry: /* * If an in-progress transaction is affecting the visibility of this - * tuple, we need to wait for it to complete and then recheck. For + * tuple, we need to wait for it to complete and then recheck. For * simplicity we do rechecking by just restarting the whole scan --- * this case probably doesn't happen often enough to be worth trying * harder, and anyway we don't want to hold any index internal locks @@ -1308,15 +1309,15 @@ retry: index_endscan(index_scan); /* - * We should have found our tuple in the index, unless we exited the - * loop early because of conflict. Complain if not. + * We should have found our tuple in the index, unless we exited the loop + * early because of conflict. Complain if not. */ if (!found_self && !conflict) ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), errmsg("failed to re-find tuple within index \"%s\"", RelationGetRelationName(index)), - errhint("This may be because of a non-immutable index expression."))); + errhint("This may be because of a non-immutable index expression."))); econtext->ecxt_scantuple = save_scantuple; @@ -1327,7 +1328,7 @@ retry: /* * Check existing tuple's index values to see if it really matches the - * exclusion condition against the new_values. Returns true if conflict. + * exclusion condition against the new_values. Returns true if conflict. */ static bool index_recheck_constraint(Relation index, Oid *constr_procs, |