This is probably an incredibly dumb question.
Either psyco2pg or postgres doesn’t like the similarity operator. This works:
sql = 'Select * from movie where title = %s'
data = ('Clockers',)
cur.execute(sql, data)
But when I change the operator to the pg_trgm module’s ‘%’, I get a ‘tuple index out of range’ error.
sql = 'Select * from movie where title % %s'
data = ('Clockers',)
cur.execute(sql, data)
Is there a workaround?
Try
title %% %s(copied and pasted from comment)