Re: Bug in copy - Mailing list pgsql-bugs

From Laurenz Albe
Subject Re: Bug in copy
Date
Msg-id 3a1189c579c1e0189f3aae60d2cdf7b7dcd6c1cd.camel@cybertec.at
Whole thread Raw
In response to Re: Bug in copy  (me nefcanto <sn.1361@gmail.com>)
List pgsql-bugs
On Sat, 2025-02-08 at 09:31 +0330, me nefcanto wrote:
> Inserting a million records not in an all-or-fail is a requirement. What options do we have for that?

Use COPY to load the data into a new (temporary?) table.
Then use INSERT INTO ... SELECT ... ON CONFLICT ... or MERGE to merge
the data from that table to the actual destination.

COPY is not a full-fledged ETL tool.

Yours,
Laurenz Albe



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Bug in copy
Next
From: me nefcanto
Date:
Subject: Re: Bug in copy