diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
-rw-r--r-- | src/include/catalog/pg_constraint.h | 11 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index d0fa1d1222b..c8259b833bc 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202111301 +#define CATALOG_VERSION_NO 202112081 #endif diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h index e75baa8e1ed..eab50053b01 100644 --- a/src/include/catalog/pg_constraint.h +++ b/src/include/catalog/pg_constraint.h @@ -139,6 +139,12 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) Oid conffeqop[1] BKI_LOOKUP(pg_operator); /* + * If a foreign key with an ON DELETE SET NULL/DEFAULT action, the subset + * of conkey to updated. If null, all columns are updated. + */ + int16 confdelsetcols[1]; + + /* * If an exclusion constraint, the OIDs of the exclusion operators for * each column of the constraint */ @@ -220,6 +226,8 @@ extern Oid CreateConstraintEntry(const char *constraintName, int foreignNKeys, char foreignUpdateType, char foreignDeleteType, + const int16 *fkDeleteSetCols, + int numFkDeleteSetCols, char foreignMatchType, const Oid *exclOp, Node *conExpr, @@ -254,7 +262,8 @@ extern Bitmapset *get_primary_key_attnos(Oid relid, bool deferrableOk, Oid *constraintOid); extern void DeconstructFkConstraintRow(HeapTuple tuple, int *numfks, AttrNumber *conkey, AttrNumber *confkey, - Oid *pf_eq_oprs, Oid *pp_eq_oprs, Oid *ff_eq_oprs); + Oid *pf_eq_oprs, Oid *pp_eq_oprs, Oid *ff_eq_oprs, + int *num_fk_del_set_cols, AttrNumber *fk_del_set_cols); extern bool check_functional_grouping(Oid relid, Index varno, Index varlevelsup, diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 067138e6b59..4c5a8a39bf1 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -2301,6 +2301,7 @@ typedef struct Constraint char fk_matchtype; /* FULL, PARTIAL, SIMPLE */ char fk_upd_action; /* ON UPDATE action */ char fk_del_action; /* ON DELETE action */ + List *fk_del_set_cols; /* ON DELETE SET NULL/DEFAULT (col1, col2) */ List *old_conpfeqop; /* pg_constraint.conpfeqop of my former self */ Oid old_pktable_oid; /* pg_constraint.confrelid of my former * self */ |