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

Commitf456634

Browse files
committed
Create foreign key triggers in partitioned tables too
While user-defined triggers defined on a partitioned table havea catalog definition for both it and its partitions, internaltriggers used by foreign keys defined on partitioned tables onlyhave a catalog definition for its partitions. This commit fixesthat so that partitioned tables get the foreign key triggers too,just like user-defined triggers. Moreover, like user-definedtriggers, partitions' internal triggers will now also have theirtgparentid set appropriately. This is to allow subsequent commit(s)to make the foreign key related events to be fired in some casesusing the parent table triggers instead of those of partitions'.This also changes what tgisinternal means in some cases. Currently,it means either that the trigger is an internal implementation objectof a foreign key constraint, or a "child" trigger on a partitioncloned from the trigger on the parent. This commit changes it toonly mean the former to avoid confusion. As for the latter, it canbe told by tgparentid being nonzero, which is now true both for user-defined and foreign key's internal triggers.Author: Amit Langote <amitlangote09@gmail.com>Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>Reviewed-by: Arne Roland <A.Roland@index.de>Discussion:https://postgr.es/m/CA+HiwqG7LQSK+n8Bki8tWv7piHD=PnZro2y6ysU2-28JS6cfgQ@mail.gmail.com
1 parentc2e8bd2 commitf456634

File tree

7 files changed

+490
-90
lines changed

7 files changed

+490
-90
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp