Re: MERGE command for inheritance

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Boxuan Zhai <bxzhai2010@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-08-10T14:03:02Z
Lists: pgsql-hackers
On tis, 2010-08-10 at 17:38 +0800, Boxuan Zhai wrote:
> I am not sure if inheritance of MERGE is needed by postgres.

Yes, it is.

> PS: for my investigation on the inheritance actions, I find that
> although the children tables are modified by the UPDATE or DELETE
> commands on their ancestor tables, the rules defined on them are not
> activated during the query. Is this the case (I hope I am not asking a
> stupid question)? And, if so, I may ask why we want it to act like
> this. 

Your observation is correct.  You could probably argue this way or that
about how it should have been designed 20+ years ago, but this is how it
is.

In general, I wouldn't design new functionality on top of rules.  Rules
are pretty broken in many ways.