I want to do the bulk delete in postgres using python and my where clause has multiple columns to fetch the correct record.
For One records i ran this
delete products where company_id=’123′ and product_id=1;
I tried this for multiple records but getting this error
the query contains more than one ‘%s’ placeholder
query = delete products where company_id='%s' and product_id=%s; values =[(1,2),(3,4)] psycopg2.extras.execute_values(self.cursor, delete_query, values)
Source: Python Questions