Re: BUG #17845: insert into on conflict bug . - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #17845: insert into on conflict bug .
Date
Msg-id CAKFQuwZJSjVQDX5W00PeinCNvtm7Nt32z1Gzyavo+ebbEph1wg@mail.gmail.com
Whole thread Raw
In response to Re:Re: BUG #17845: insert into on conflict bug .  (德哥 <digoal@126.com>)
Responses Re: BUG #17845: insert into on conflict bug .
List pgsql-bugs
On Thursday, March 16, 2023, 德哥 <digoal@126.com> wrote:
In this case, `where a.ts < exclude. ts` and `order by ts desc` are used. The ts of the tuple inserted first is the largest. So why throw an error? Throwing an error here is obviously not logically correct.

You’d get a duplicate value violation instead.  As it stands, which error you get is somewhat non-deterministic, but you will get one.

David J.
 

pgsql-bugs by date:

Previous
From: jian he
Date:
Subject: Re: Re: BUG #17845: insert into on conflict bug .
Next
From: Tom Lane
Date:
Subject: Re: BUG #17845: insert into on conflict bug .