diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/tupdesc.h | 1 | ||||
-rw-r--r-- | src/include/catalog/heap.h | 1 | ||||
-rw-r--r-- | src/include/commands/typecmds.h | 1 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 3 |
4 files changed, 6 insertions, 0 deletions
diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index 99448efe12f..8b99cb849d8 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -29,6 +29,7 @@ typedef struct constrCheck { char *ccname; char *ccbin; /* nodeToString representation of expr */ + bool ccvalid; } ConstrCheck; /* This structure contains constraints of a tuple */ diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index c95e91303b8..0b7b190dd10 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -30,6 +30,7 @@ typedef struct CookedConstraint char *name; /* name, or NULL if none */ AttrNumber attnum; /* which attr (only for DEFAULT) */ Node *expr; /* transformed default or check expr */ + bool skip_validation; /* skip validation? (only for CHECK) */ bool is_local; /* constraint has local (non-inherited) def */ int inhcount; /* number of times constraint is inherited */ } CookedConstraint; diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h index 6d9d1ccaa95..23726fb0fb2 100644 --- a/src/include/commands/typecmds.h +++ b/src/include/commands/typecmds.h @@ -31,6 +31,7 @@ extern Oid AssignTypeArrayOid(void); extern void AlterDomainDefault(List *names, Node *defaultRaw); extern void AlterDomainNotNull(List *names, bool notNull); extern void AlterDomainAddConstraint(List *names, Node *constr); +extern void AlterDomainValidateConstraint(List *names, char *constrName); extern void AlterDomainDropConstraint(List *names, const char *constrName, DropBehavior behavior); diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index c65e3cd6e8c..00c1269bd14 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1190,6 +1190,7 @@ typedef enum AlterTableType AT_AddConstraint, /* add constraint */ AT_AddConstraintRecurse, /* internal to commands/tablecmds.c */ AT_ValidateConstraint, /* validate constraint */ + AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */ AT_ProcessedConstraint, /* pre-processed add constraint (local in * parser/parse_utilcmd.c) */ AT_AddIndexConstraint, /* add constraint using existing index */ @@ -1543,6 +1544,8 @@ typedef struct Constraint char fk_matchtype; /* FULL, PARTIAL, UNSPECIFIED */ char fk_upd_action; /* ON UPDATE action */ char fk_del_action; /* ON DELETE action */ + + /* Fields used for constraints that allow a NOT VALID specification */ bool skip_validation; /* skip validation of existing rows? */ bool initially_valid; /* mark the new constraint as valid? */ } Constraint; |