|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.173 2010/07/06 19:18:56 momjian Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.174 2010/07/16 00:45:30 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -1309,16 +1309,12 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo,
|
1309 | 1309 | index_endscan(index_scan);
|
1310 | 1310 |
|
1311 | 1311 | /*
|
1312 |
| - * We should have found our tuple in the index, unless we exited the loop |
1313 |
| - * early because of conflict. Complain if not. If we ever implement '<>' |
1314 |
| - * index opclasses, this check will fail and will have to be removed. |
| 1312 | + * Ordinarily, at this point the search should have found the originally |
| 1313 | + * inserted tuple, unless we exited the loop early because of conflict. |
| 1314 | + * However, it is possible to define exclusion constraints for which |
| 1315 | + * that wouldn't be true --- for instance, if the operator is <>. |
| 1316 | + * So we no longer complain if found_self is still false. |
1315 | 1317 | */
|
1316 |
| - if (!found_self && !conflict) |
1317 |
| - ereport(ERROR, |
1318 |
| - (errcode(ERRCODE_INTERNAL_ERROR), |
1319 |
| - errmsg("failed to re-find tuple within index \"%s\"", |
1320 |
| - RelationGetRelationName(index)), |
1321 |
| - errhint("This may be because of a non-immutable index expression."))); |
1322 | 1318 |
|
1323 | 1319 | econtext->ecxt_scantuple = save_scantuple;
|
1324 | 1320 |
|
|
0 commit comments