From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Remove mention in docs that foreign keys on partitioned tables are not supported |
Date: | 2018-06-15 06:16:39 |
Message-ID: | c5bdfe61-08d7-3bed-3df3-6c65441a4050@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018/06/14 22:45, Ashutosh Bapat wrote:
> On Thu, Jun 14, 2018 at 6:49 PM, Robert Haas <robertmhaas(at)gmail(dot)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
Attachment | Content-Type | Size |
---|---|---|
BR-trigger-limitation-wording-tweak.patch | text/plain | 775 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Antonin Houska | 2018-06-15 06:54:52 | Memory leaks in BufFileOpenShared() |
Previous Message | Yinjie Lin | 2018-06-15 06:02:50 | Re: Two round for Client Authentication |