Discussion:
[ADMIN] triggers are not shared between parent and child tables?
(too old to reply)
Rural Hunter
2012-03-12 03:06:04 UTC
Permalink
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).
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner
2012-03-12 14:11:16 UTC
Permalink
"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
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Rural Hunter
2012-03-12 14:50:08 UTC
Permalink
yes, I understand that. but is it worth mentioning in the doc?
Post by Kevin Grittner
"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
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner
2012-03-12 14:58:06 UTC
Permalink
Post by Rural Hunter
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
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Rural Hunter
2012-03-12 15:06:11 UTC
Permalink
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.
Post by Kevin Grittner
Post by Rural Hunter
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
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...