pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
triggers are not shared between parent and child tables?
5+ messages / 2 participants
[nested] [flat]

* triggers are not shared between parent and child tables?
@ 2012-03-12 03:06  Rural Hunter <ruralhunter@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Rural Hunter @ 2012-03-12 03:06 UTC (permalink / raw)
  To: pgsql-admin

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).



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: triggers are not shared between parent and child tables?
@ 2012-03-12 14:11  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  parent: Rural Hunter <ruralhunter@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Kevin Grittner @ 2012-03-12 14:11 UTC (permalink / raw)
  To: Rural Hunter <ruralhunter@gmail.com>; pgsql-admin

Rural Hunter <ruralhunter@gmail.com> 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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: triggers are not shared between parent and child tables?
@ 2012-03-12 14:50  Rural Hunter <ruralhunter@gmail.com>
  parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 5+ messages in thread

From: Rural Hunter @ 2012-03-12 14:50 UTC (permalink / raw)
  To: Kevin Grittner <kevin.grittner@wicourts.gov>; +Cc: pgsql-admin

yes, I understand that. but is it worth mentioning in the doc?

于2012年3月12日 22:11:16,Kevin Grittner写到:
> Rural Hunter<ruralhunter@gmail.com>  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
>





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: triggers are not shared between parent and child tables?
@ 2012-03-12 14:58  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  parent: Rural Hunter <ruralhunter@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Kevin Grittner @ 2012-03-12 14:58 UTC (permalink / raw)
  To: Rural Hunter <ruralhunter@gmail.com>; +Cc: pgsql-admin

Rural Hunter <ruralhunter@gmail.com> 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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: triggers are not shared between parent and child tables?
@ 2012-03-12 15:06  Rural Hunter <ruralhunter@gmail.com>
  parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 5+ messages in thread

From: Rural Hunter @ 2012-03-12 15:06 UTC (permalink / raw)
  To: Kevin Grittner <kevin.grittner@wicourts.gov>; +Cc: pgsql-admin

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<ruralhunter@gmail.com>  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
>





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2012-03-12 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 03:06 triggers are not shared between parent and child tables? Rural Hunter <ruralhunter@gmail.com>
2012-03-12 14:11 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-03-12 14:50   ` Rural Hunter <ruralhunter@gmail.com>
2012-03-12 14:58     ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-03-12 15:06       ` Rural Hunter <ruralhunter@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox