You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have support for COPY here, but it's not as flexible or as easy to use as the above syntax. Also, the above syntax allows for ON CONFLICT(id) UPDATE name = EXCLUDED.name, which is great for bulk updates / upserts.
The generated Go code should take a list of Param objects as input. I'm not quite sure how the SQL template should look, but maybe something like
-- name: BulkInsertBooks :bulk
INSERT INTO books(id, name) VALUES @bulkBookRows;
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Activity
Jille commentedon Jun 28, 2023
I've started a Discussion about how to implement this in #2385
adi-kmt commentedon Apr 8, 2024
Are we expecting this to be dynamic as well?
Because Even subqueries and conflicts don't seem to work with copy from