mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Replace pg_class.relhasexclusion with pg_index.indisexclusion.
There isn't any need to track this state on a table-wide basis, and trying to do so introduces undesirable semantic fuzziness. Move the flag to pg_index, where it clearly describes just a single index and can be immutable after index creation.
This commit is contained in:
@ -949,7 +949,7 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx,
|
||||
* certainly isn't. If it is or might be from a constraint, we have to
|
||||
* fetch the pg_constraint record.
|
||||
*/
|
||||
if (index->primary || index->unique || idxrelrec->relhasexclusion)
|
||||
if (index->primary || index->unique || idxrec->indisexclusion)
|
||||
{
|
||||
Oid constraintId = get_index_constraint(source_relid);
|
||||
|
||||
@ -970,7 +970,7 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx,
|
||||
index->initdeferred = conrec->condeferred;
|
||||
|
||||
/* If it's an exclusion constraint, we need the operator names */
|
||||
if (idxrelrec->relhasexclusion)
|
||||
if (idxrec->indisexclusion)
|
||||
{
|
||||
Datum *elems;
|
||||
int nElems;
|
||||
|
Reference in New Issue
Block a user