Re: [HACKERS] MERGE SQL Statement for PG11

Andreas Seltenreich <seltenreich@gmx.de>

From: Andreas Seltenreich <seltenreich@gmx.de>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Pavel Stehule <pavel.stehule@gmail.com>, Chapman Flack <chap@anastigmatix.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-02-18T11:18:43Z
Lists: pgsql-hackers

Attachments

Pavan Deolasee writes:

> Thanks for doing those tests. I've just sent v16a version of the patch and
> I think it fixes the issues reported so far. Can you please recheck? Please
> let me know if there are other issues detected by sqlsmith or otherwise.

I re-did the testing with merge_v16a applied to master at 7923118c16
with ad7dbee368a reverted because of conflicts.  I can confirm that the
previous testcases don't fail anymore, but sqlsmith readily triggers the
following assertion:

TRAP: FailedAssertion("!(mergeTargetRelation > 0)", File: "planner.c",
Line: 1496)

Testcase attached.

regards,
Andreas

Commits

  1. Add support for MERGE SQL command

  2. Add API of sorts for transition table handling in trigger.c

  3. Revert MERGE patch

  4. Fix several bugs related to ON CONFLICT's EXCLUDED pseudo relation.