Re: BUG #15623: Inconsistent use of default for updatable view

Dean Rasheed <dean.a.rasheed@gmail.com>

From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Roger Curley <rocurley@gmail.com>, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Date: 2019-02-10T11:18:46Z
Lists: pgsql-bugs, pgsql-hackers

Attachments

On Sun, 10 Feb 2019 at 00:48, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> However, this is still not the end of the story, because it doesn't
> fix the fact that, if the view has a DO ALSO rule on it, single-row
> inserts behave differently from multi-row inserts. In that case, each
> insert becomes 2 inserts, and defaults need to be treated differently
> in each of the 2 queries. That's going to need a little more thought.
>

Here's an updated patch to handle that case.

In case it's not obvious, I'm not intending to try to get this into
next week's updates -- more time is needed to be sure of this fix, and
more pairs of eyes would definitely be helpful, once those updates
have been shipped.

Regards,
Dean

Commits

  1. Further fixing for multi-row VALUES lists for updatable views.

  2. Fix DEFAULT-handling in multi-row VALUES lists for updatable views.