Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
Date
Msg-id CAM3SWZSu88Kbu_htJT1FfTWUkfaSd+8Q+oArbyX+SE5i2KPJ0w@mail.gmail.com
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
List pgsql-hackers
On Wed, May 20, 2015 at 6:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I am not really sure that it was a good idea to invent
> this command tag.  In fact, I'm pretty sure it was a *bad* idea ---
> what will happen if we ever create a statement actually named UPSERT?

Why would we invent a statement actually named UPSERT?

> I think we should fix this by ripping out the variant tag, not trying
> to propagate it everywhere it would need to go.  Cute ideas are not
> the same as good ideas.

I don't feel particularly strongly about it one way or the other. The
way the command tag reports number of rows affected beside the INSERT
tag in psql is relevant. If some of those rows were actually updated,
that could mislead. I'm not saying that it outweighs your concern, but
it was the reason for inventing a variant tag, and it is a
consideration.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
Next
From: Alvaro Herrera
Date:
Subject: Re: Change pg_cancel_*() to ignore current backend