You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlalchemy
What's the proper syntax for doing a bulk upsert using the new on_conflict_do_update clause? In postgres there is apparently a special table called 'excluded' which contains all the rows to be inserted, so the raw query looks like this:
INSERT into MYTABLE(col1,col2,col3) VALUES (a,b,c),(d,e,f)
ON CONFLICT (col1) DO
UPDATE SET
col2 = excluded.col2
col3 = excluded.col3
Does sqlalchemy support bulk upserts like this yet?
mike bayer
unread,
Dec 2, 2016, 3:41:19 PM12/2/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
that is now supported using a special PG specific Insert object: