From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Thom Brown <thom(at)linux(dot)com> |
Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, hlinnaka <hlinnaka(at)iki(dot)fi>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Date: | 2015-05-20 17:11:16 |
Message-ID: | 20150520171116.GE27868@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On 2015-05-20 18:09:05 +0100, Thom Brown wrote:
> On 20 May 2015 at 17:54, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > On 2015-05-20 17:44:05 +0100, Thom Brown wrote:
> >> The docs say "Note that exclusion constraints are not supported with
> >> ON CONFLICT DO UPDATE."
> >>
> >> But I get the following error message text:
> >>
> >> "ERROR: there is no unique or exclusion constraint matching the ON
> >> CONFLICT specification"
> >>
> >> This implies that an exclusion constraint is valid in the statement,
> >> which contradicts the docs. Which one is correct?
> >
> > ON CONFLICT can be used for ... DO NOTHING as well.
>
> Yes, but still confusing when not using DO NOTHING.
I'm not sure I can follow. INSERT INTO account VALUES(...) ON CONFLICT
(email) DO NOTHING; seems to make sense to me?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-05-20 17:31:57 | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Previous Message | Thom Brown | 2015-05-20 17:09:05 | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-05-20 17:31:57 | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Previous Message | Thom Brown | 2015-05-20 17:09:05 | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |