Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
От | Amit Langote |
---|---|
Тема | Re: Remove mention in docs that foreign keys on partitioned tablesare not supported |
Дата | |
Msg-id | c5bdfe61-08d7-3bed-3df3-6c65441a4050@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: Remove mention in docs that foreign keys on partitioned tablesare not supported (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Список | pgsql-hackers |
On 2018/06/14 22:45, Ashutosh Bapat wrote: > On Thu, Jun 14, 2018 at 6:49 PM, Robert Haas <robertmhaas@gmail.com> wrote: >> It sounds like you want to try to hide from users the fact that they >> can create triggers on the individual partitions. > > No. I never said that in my mails (see [1], [2]) I object to the > explicit suggestion that they can/should create BEFORE ROW triggers on > partitions since those are not supported on the partitioned table. I understand Ashutosh's worry as follows: A workaround for the limitation that BR triggers cannot be defined on partitioned tables yet is to define that *same* trigger on all partitions, which works from the beginning (PG 10), so that gets the job done. But... some users may however fail to ensure that the trigger's definition is exactly alike for each partition, especially they are likely to make each trigger call a different function, although each of those functions may have the same body of code. When in some future release, one is able to define the trigger on the partitioned table and does so, the trigger will end up being created again on each partition, because the existing trigger on each partition (after upgrading) would be different due to a different function being called in each. I proposed that we reword the sentence that describes this particular limitation to warn users about that. See if the attached patch is any good for that. Thanks, Amit
Вложения
В списке pgsql-hackers по дате отправления: