Fixing Constraint Violations

When Vertica finds duplicate primary key or unique values at run time, use the DISABLE_DUPLICATE_KEY_ERROR function to suppress error messaging. Queries execute as though no constraints are defined on the schema and the effects are session scoped.

The DISABLE_DUPLICATE_KEY_ERROR function is for use only for key constraints that are not automatically enabled.

Caution: When called, DISABLE_DUPLICATE_KEY_ERROR suppresses data integrity checking and can lead to incorrect query results. Use this function only after you insert duplicate primary keys into a dimension table in the presence of a pre-join projection. Correct the violations and reenable integrity checking with REENABLE_DUPLICATE_KEY_ERROR.