Re: Partitioning triggers doc patch
От | Kevin Grittner |
---|---|
Тема | Re: Partitioning triggers doc patch |
Дата | |
Msg-id | 4F5DEE8A0200002500046173@gw.wicourts.gov обсуждение исходный текст |
Ответ на | Re: Partitioning triggers doc patch (Jaime Casanova <jaime@2ndquadrant.com>) |
Ответы |
Re: Partitioning triggers doc patch
|
Список | pgsql-hackers |
Jaime Casanova <jaime@2ndquadrant.com> wrote: > On Mon, Mar 12, 2012 at 10:41 AM, Kevin Grittner > <Kevin.Grittner@wicourts.gov> wrote: >> Attached is a doc patch based on a suggestion by Rural Hunter to >> address something he found confusing while setting up >> partitioning. >> >> Original thread is here: >> >> http://archives.postgresql.org/pgsql-admin/2012-03/msg00066.php >> > > you can create trigger that execute before the trigger that > redirect to the partition, for example to stamp the time or the > user... so it should state something like i said about constraints > > """ > Do not define any check constraints on this table, unless you > intend them to be applied equally to all partitions. > """ Yeah, I thought about that issue, but the problem is that the rule or trigger that routes the operation to another partition might prevent the trigger from firing at all. I figured that if I went as far as what you describe, I would need to get into those timing issues, too; and I wasn't sure whether that might be "too much information" for that particular spot. But if you think we should go there, I could draft something which pointed out that an AFTER trigger is never useful and that a BEFORE trigger to enforce things globally must sort ahead of the "routing" trigger, and should not be used at all if a RULE is used to route operations to the partitions. Do we really want to get into all that in the middle of step-by-step instructions for the simple case? -Kevin
В списке pgsql-hackers по дате отправления: