pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: todoubaba@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16856: Crash when add "_RETURN" rule on child table
Date: Sat, 06 Feb 2021 12:31:01 -0500
Message-ID: <192154.1612632661@sss.pgh.pa.us> (raw)
In-Reply-To: <191747.1612632025@sss.pgh.pa.us>
References: <16856-0363e05c6e1612fd@postgresql.org>
	<YB6QA1T0X//P+99P@paquier.xyz>
	<191747.1612632025@sss.pgh.pa.us>

I wrote:
> So my take is that this is an oversight in the CREATE RULE logic
> that allows converting a table to a view: if it has inheritance
> parents or children we must disallow doing that.

Come to think of it, applying ON INSERT/UPDATE/DELETE rules to
inheritance tree members is a bit problematic too.  If you do
"UPDATE parent SET ..." then any ON UPDATE rules on the child
table are ignored (since the rewriter considers only "parent").
This probably doesn't lead to any system malfunctions, but
users might find it surprising.  I bet we don't document that
adequately.

			regards, tom lane





view thread (4+ messages)

Message-ID: <192154.1612632661@sss.pgh.pa.us>
Permalink:  ../192154.1612632661@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/192154.1612632661@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, todoubaba@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16856: Crash when add "_RETURN" rule on child table
  In-Reply-To: <192154.1612632661@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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