I am following a tutorial from here, and trying to adapt it to pass multiple column values. I've tried solving this by researching the error message but every time I've tried re-writing the values with a { I get a different set of errors. What am I doing wrong?
DataError: malformed array literal: "value1" LINE 1: ... public."Texas"(licensenum,businessowner) VALUES ('value1','... ^ DETAIL: Array value must start with "{" or dimension information.
My Code:
import psycopg2
conn = psycopg2.connect(host="localhost",database="postgres", user="postgres", password="supershinypwdhere")
cur = conn.cursor()
cur.executemany("insert into public.\"Texas\"(licensenum,businessowner) VALUES (%s,%s)", [('value1','value2'),('value3','value4')])
conn.commit()
cur.close()
conn.close()