I have currently written the logic in MYSQL using python and it's working without any errors. I am trying to replicate the same on POSTGRESQL. Please find the code below:
MYSQL CODE
db_cursor.execute("INSERT INTO table1 SELECT * FROM table2 ON DUPLICATE KEY UPDATE col1=VALUES(col1), col2=VALUES(col2)")
POSTGRESQL CODE
db_cursor.execute("INSERT INTO table1 SELECT * FROM table2 ON DUPLICATE KEY UPDATE col1=SELECT(col1), col2=SELECT(col2)")
I am getting the following error while trying to execute the POSTGRESQL code:
TypeError: function missing required argument 'vars_list' (pos 2)