I am using python 2.7 and postgresql 9.3 with psycopg2 2.7.3, when I try to execute a select query while parameter passing it gives me this error psycopg2.ProgrammingError: syntax error at or near "OR
cur = con.cursor()
cur.execute('SELECT * FROM test WHERE voucher= ? OR voucher= ?', ('RHAT', 'MSO'))
the error message is
psycopg2.ProgrammingError: syntax error at or near "OR"