I can I update multiple columns for a particular row with psycopg2? I have tried this but I get the error I show bellow:
cursor = postgres_conn.cursor()
sql_update = "UPDATE table_name SET a=%s, b=%s, c=%s WHERE url=%s"
cursor.execute(sql_update,(1,2,3,url))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
question from:
https://stackoverflow.com/questions/65645579/update-multiple-columns-with-psycopg2 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…