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

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Roger Curley <rocurley(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org>
Subject: Re: BUG #15623: Inconsistent use of default for updatable view
Date: 2019-02-10 11:18:46
Message-ID: CAEZATCX1cN4Lcd80ZJXHf7qVRrMReOSOUF_0Z6YFhk89NNcGbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Sun, 10 Feb 2019 at 00:48, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)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

Attachment Content-Type Size
view-insert-null-default-fix-v4.patch application/octet-stream 22.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-02-10 16:30:29 BUG #15627: libpq memory leak
Previous Message PG Bug reporting form 2019-02-10 07:10:23 BUG #15626: Incorrect version number shown in BigSQL installation

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2019-02-10 12:23:44 Re: Inadequate executor locking of indexes
Previous Message Andrey Borodin 2019-02-10 08:25:19 Re: [WIP] CREATE SUBSCRIPTION with FOR TABLES clause (table filter)