Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4797f9b

Browse files
committed
Merge near-duplicate code in RI triggers.
Merge ri_restrict_del and ri_restrict_upd into one function ri_restrict.Create a function ri_setnull that is the common implementation ofRI_FKey_setnull_del and RI_FKey_setnull_upd. Likewise create a functionri_setdefault that is the common implementation of RI_FKey_setdefault_deland RI_FKey_setdefault_upd. All of these pairs of functions were identicalexcept for needing to check for no-actual-key-change in the UPDATE cases;the one extra if-test is a small price to pay for saving so much code.Aside from removing about 400 lines of essentially duplicate code, thisallows us to recognize that we were uselessly caching two identical planswhenever there were pairs of triggers using these duplicated functions(which is likely very common).Ildar Musin, reviewed by Ildus KurbangalievDiscussion:https://postgr.es/m/ca7064a7-6adc-6f22-ca47-8615ba9425a5@postgrespro.ru
1 parentd0aa965 commit4797f9b

File tree

1 file changed

+146
-569
lines changed

1 file changed

+146
-569
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp