mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.253 2009/09/27 01:32:11 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.254 2009/12/07 05:22:21 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1100,6 +1100,10 @@ index_register(Oid heap,
|
||||
newind->il_info->ii_Predicate = (List *)
|
||||
copyObject(indexInfo->ii_Predicate);
|
||||
newind->il_info->ii_PredicateState = NIL;
|
||||
/* no exclusion constraints at bootstrap time, so no need to copy */
|
||||
Assert(indexInfo->ii_ExclusionOps == NULL);
|
||||
Assert(indexInfo->ii_ExclusionProcs == NULL);
|
||||
Assert(indexInfo->ii_ExclusionStrats == NULL);
|
||||
|
||||
newind->il_next = ILHead;
|
||||
ILHead = newind;
|
||||
|
Reference in New Issue
Block a user