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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17845: insert into on conflict bug .
Дата
Msg-id CAKFQuwZtoQ_Mmt2xuEe7pFvnbGYzPM7i1swpaTq8Ew7jHqVukA@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17845: insert into on conflict bug .  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17845: insert into on conflict bug .  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Thursday, March 16, 2023, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17845
Logged by:          Zhou Digoal
Email address:      digoal@126.com
PostgreSQL version: 15.2
Operating system:   macos
Description:       

insert into on conflict bug .
In the following insert statement, the row has not been updated multiple
times, why is it still showing an error?

```
create table a (id int primary key, info text, ts date);


insert into a
select * from (values (1,'a',date '2022-01-01'),(1,'b',date
'2022-01-02'),(1,'c',date '2022-01-03')) as t (id,info,ts) order by ts
desc
on conflict (id)
do update set info=excluded.info, ts=excluded.ts where a.ts < excluded.ts ;


You have id=1 in there three times which is precisely the definition of “multiple times” (I.e., more than 1)

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: pg_read_server_files doesn't let me use pg_ls_dir() or pg_read_file?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17845: insert into on conflict bug .