| From: | Barry Kimelman <blkimelman(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: problem with on conflict / do update using psql 14.4 |
| Date: | 2022-09-24 16:04:14 |
| Message-ID: | CAMPa0rXsKshBYP_Nt26HpgP0J2AbrCDMdKNg+-A51fubVhOr0w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Sat, Sep 24, 2022 at 10:56 AM Christophe Pettus <xof(at)thebuild(dot)com> wrote:
>
>
> > On Sep 24, 2022, at 08:49, Barry Kimelman <blkimelman(at)gmail(dot)com> wrote:
> > I thought the whole point of ON CONFLICT DO UPDATE was so that you could
> modify the data so that it would be inserted
>
> ON CONFLICT DO UPDATE allows you to modify the existing row that
> conflicted with the row being inserted, but it won't allow you to do change
> a row to resolve a conflict, and then insert it.
Unfortunately, that is exactly what I need to do, I need to modify the data
on the 2nd request so that it also gets inserted.
This is a business requirement. I need to insert all of the data, including
the ones with conflicts
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christophe Pettus | 2022-09-24 16:40:23 | Re: problem with on conflict / do update using psql 14.4 |
| Previous Message | Christophe Pettus | 2022-09-24 15:56:32 | Re: problem with on conflict / do update using psql 14.4 |