triggers are not shared between parent and child tables?

Поиск
Список
Период
Сортировка
Искать

triggers are not shared between parent and child tables?

От:
Rural Hunter <ruralhunter@gmail.com>
Дата:
I implemented table partition recently and found that the tiggers on 
parent table are not working any more, except the before insert trigger 
which redirects data to children table. The after insert/update triggers 
are not working now. I understand the after insert trigger may not 
working since the before insert trigger redirects inserts to children 
table and returns null. But why the update triggers are also not 
working? I googled and found this 
article(http://www.peachpit.com/articles/article.aspx?p=31206&seqNum=3) 
mentions "triggers are not shared between parent and child tables". is 
it true? Maybe I overlooked but somehow I didn't find this in partition 
part of postgresql 
doc(http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html).

Re: triggers are not shared between parent and child tables?

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Rural Hunter  wrote:
 
> "triggers are not shared between parent and child tables". is it
> true? 
 
Yes.
 
You can use the same trigger *function* for more than one trigger
though.
 
-Kevin

Re: triggers are not shared between parent and child tables?

От:
Rural Hunter <ruralhunter@gmail.com>
Дата:
yes, I understand that. but is it worth mentioning in the doc?

于2012年3月12日 22:11:16,Kevin Grittner写到:
> Rural Hunter  wrote:
>
>> "triggers are not shared between parent and child tables". is it
>> true?
>
> Yes.
>
> You can use the same trigger *function* for more than one trigger
> though.
>
> -Kevin
>


Re: triggers are not shared between parent and child tables?

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Rural Hunter  wrote:
 
> is it worth mentioning in the doc?
 
Do you have a suggestion for what language you would have found
helpful, or which section(s) of the docs should be modified?
 
-Kevin

Re: triggers are not shared between parent and child tables?

От:
Rural Hunter <ruralhunter@gmail.com>
Дата:
hmm....if you ask me, I would like to suggest add this part in the 
fisrt step(create the master table) of 5.9.2 of this doc: 
http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html
The doc mentions here that there is no point to define 
indexes/constraints on parent table. But it didn't mention about 
triggers.

于2012年3月12日 22:58:06,Kevin Grittner写到:
> Rural Hunter  wrote:
>
>> is it worth mentioning in the doc?
>
> Do you have a suggestion for what language you would have found
> helpful, or which section(s) of the docs should be modified?
>
> -Kevin
>


FAQ