-
- Downloads
Share RI trigger code between NO ACTION and RESTRICT cases.
These triggers are identical except for whether ri_Check_Pk_Match is to be called, so factor out the common code to save a couple hundred lines. Also, eliminate null-column checks in ri_Check_Pk_Match, since they're duplicate with the calling functions and require unnecessary complication in its API statement. Simplify the way code is shared between RI_FKey_check_ins and RI_FKey_check_upd, too.
Showing
- src/backend/utils/adt/ri_triggers.c 234 additions, 544 deletionssrc/backend/utils/adt/ri_triggers.c
- src/test/regress/expected/foreign_key.out 26 additions, 0 deletionssrc/test/regress/expected/foreign_key.out
- src/test/regress/sql/foreign_key.sql 22 additions, 0 deletionssrc/test/regress/sql/foreign_key.sql
Loading
Please register or sign in to comment