Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date: 2014-10-09 05:49:47
Message-ID: CA+U5nMJkjc4LXt1dS8hYse=t7qSETw61tgxyECvhQb1V3Ye1qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8 October 2014 23:24, Peter Geoghegan <pg(at)heroku(dot)com> wrote:

>> Also, it would be useful to hear that your're going to do something
>> about the references to rows using conflicting(), since nobody has
>> agreed with you there. Or hopefully even that you've listened and
>> implemented something differently already. (We need that, whatever we
>> do with other elements of syntax).
>
> Do you really expect me to do major work on some aspect of the syntax
> like that, given, as you say, that nobody explicitly agreed with me
> (and only you disagreed with me)? The only remark I heard on that was
> from you (you'd prefer to use NEW.* and OLD.*).
> But you spent much
> more time talking about getting something MERGE-like, which
> NEW.*/OLD.* clearly isn't.

Yes, it is. Look at the AS clause.

> CONFLICTING() is very close (identical?) to MySQL's use of "ON
> DUPLICATE KEY UPDATE val = VALUES(val)". I'm happy to discuss that,
> but it's news to me that people take particular issue with it.

3 people have asked you questions or commented about the use of
CONFLICTING() while I've been watching. It's clearly a non-standard
mechanism and not inline with other Postgres usage. Nobody actually
says "I object to this" - do they need to use that phrase before you
take note?

I'm beginning to feel that giving you review comments is being seen as
some kind of negative action. Needing to repeat myself makes it clear
that you aren't taking note.

Yes, I expect you to do these things
* collect other people's input, even if you personally disagree
* if there is disagreement amongst reviewers, seek to resolve that in
a fair and reasonable manner
* publish a summary of changes requested
* do major work to address them

So yes, I really expect that.

It doesn't matter that it is "only SImon" or "only Kevin". **One**
comment is enough for you to take note.

If there is disagreement, publishing the summary of changes you plan
to make in your next version will help highlight that.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-10-09 06:26:41 Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves)
Previous Message Kyotaro HORIGUCHI 2014-10-09 05:06:35 Re: Escaping from blocked send() reprised.