Re: BUG #17845: insert into on conflict bug .

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: 德哥 <digoal(at)126(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17845: insert into on conflict bug .
Date: 2023-03-17 12:19:40
Message-ID: CAKFQuwZJSjVQDX5W00PeinCNvtm7Nt32z1Gzyavo+ebbEph1wg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thursday, March 16, 2023, 德哥 <digoal(at)126(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-03-17 14:17:01 Re: BUG #17845: insert into on conflict bug .
Previous Message jian he 2023-03-17 06:19:24 Re: Re: BUG #17845: insert into on conflict bug .