aio-libs/aiopg — pull request #24 by spumer (2014-07-07 10:43:51+00:00)
Title: Fix IndexError exception in cursor.execute() when empty tuple passed by default

IndexError occured in psycopg2 when we pass query with "alones" %-chars and empty tuple as params to unpack for this query.

By default in psycopg2 params is None, not empty tuple.
Second solution can be replace % -> %% for empty params list.

If you can't reproduce this with default cursor_factory try use any extra from psycopg2.extras