Re: Supporting MERGE on updatable views

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

From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-10-30T09:33:53Z
Lists: pgsql-hackers

Attachments

On Sun, 29 Oct 2023 at 17:17, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>
> On Sat, 28 Oct 2023 at 09:35, jian he <jian.universality@gmail.com> wrote:
> >
> > Do we need to add <<command>MERGE</command> for the following sentence?
> >
> We don't want to include MERGE in that sentence, because MERGE isn't
> supported on views or tables with rules, but I guess we could add
> another sentence after that one, to make that clear.
>

Here's an updated patch doing that, plus another couple of minor
updates to that page.

I also noticed that the code to detect rules ought to ignore disabled
rules, so I've updated it to do so, and added a new regression test to
cover that case.

Arguably that's a pre-existing bug, so the fix could be extracted and
applied separately, but I'm not sure that it's worth the effort.

Regards,
Dean

Commits

  1. Support MERGE into updatable views.

  2. Remove field UpdateContext->updated in nodeModifyTable.c

  3. Remove dummy_spinlock