From 0cb65564e5f855b1e9aa145fd645352130f74646 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 7 Dec 2009 05:22:23 +0000 Subject: Add exclusion constraints, which generalize the concept of uniqueness to support any indexable commutative operator, not just equality. Two rows violate the exclusion constraint if "row1.col OP row2.col" is TRUE for each of the columns in the constraint. Jeff Davis, reviewed by Robert Haas --- src/include/executor/executor.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/include/executor/executor.h') diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index ba2f42d6862..76c075f75f9 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.163 2009/10/26 02:26:41 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.164 2009/12/07 05:22:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -321,6 +321,12 @@ extern void ExecOpenIndices(ResultRelInfo *resultRelInfo); extern void ExecCloseIndices(ResultRelInfo *resultRelInfo); extern List *ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid, EState *estate, bool is_vacuum_full); +extern bool check_exclusion_constraint(Relation heap, Relation index, + IndexInfo *indexInfo, + ItemPointer tupleid, + Datum *values, bool *isnull, + EState *estate, + bool newIndex, bool errorOK); extern void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, -- cgit v1.2.3