Re: MERGE ... RETURNING

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Gurjeet Singh <gurjeet@singh.im>, Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Isaac Morland <isaac.morland@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-07-21T18:30:22Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add RETURNING support to MERGE.

  2. doc: Improve a couple of places in the MERGE docs.

  3. doc: improve description of privileges for MERGE and update glossary.

  4. Fix RLS policy usage in MERGE.

  5. Fix leak of LLVM "fatal-on-oom" section counter.

  6. Implement outer-level aggregates to conform to the SQL spec, with

On Thu, 2023-07-20 at 23:19 -0700, Gurjeet Singh wrote:
> Plus, if we were able to make it work as SQL syntax, it's very likely
> we can use the same technique to implement BEFORE and AFTER behaviour
> in UPDATE ... RETURNING that the old thread could not accomplish a
> decade ago.

To clarify, I don't think having a special table alias will require any
changes in gram.y and I don't consider it a syntactical change.

I haven't looked into the implementation yet.

Regards,
	Jeff Davis