On Thu, 9 Feb 2023 at 05:43, Aleksander Alekseev <aleksan...@timescale.com> wrote: > > >> I don't buy your argument about DO UPDATE needing to be brought into > >> line with DO NOTHING. In any case I'm pretty sure that Tom's remarks > >> in 2016 about a behavioral inconsistencies (which you cited) actually > >> called for making DO NOTHING more like DO UPDATE -- not the other way > >> around. > > > > Interesting. Yep, we could use a bit of input from Tom on this one.
I realize there are still unanswered conceptual questions about this patch but with two votes against it seems unlikely to make much more progress unless you rethink what you're trying to accomplish and package it in a way that doesn't step on these more controversial issues. I'm going to mark the patch Returned With Feedback. If Tom or someone else disagrees with Peter and Andres or has some new insights about how to make it more palatable then we can always revisit that. > > This of course would break backward compatibility. But we can always > > invent something like: > > > > ``` > > INSERT INTO .. > > ON CONFLICT DO [NOTHING|UPDATE .. ] > > [ALLOWING|FORBIDDING] SELF CONFLICTS; > > ``` > > > > ... if we really want to. Something like that might be what I mean about new insights though I suspect this is overly complex. It looks like having the ON CONFLICT UPDATE happen before the row is already inserted might simplify things conceptually but then it might make the implementation prohibitively complex. -- Gregory Stark As Commitfest Manager