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
Thanks for the help! This is what I ended up going with:
fieldnames = Enclosed(collect(keys(swaps_as_nts[1])))
Repo.execute([INSERT INTO SwapsTable fieldnames VALUES Octo.VectorOfTuples(map(values, swaps_as_nts)) ON CONFLICT DO UPDATE])
However that is missing SET at the end of the query. Hopefully eventually Postgres will allow us to REPLACE the entire record and not have to specify each column.
I guess for now the solution is to delete record matching id if it exists and then inserting. Not ideal but it works.
What is the proper way to do a multiple insert followed by ON CONFLICT DO UPDATE.
The text was updated successfully, but these errors were encountered: