def date_extract_sql(self, lookup_type, field_name):
        # http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
        return (lookup_type, field_name) % "EXTRACT('%s' FROM %s)"
dataset/ETHPy150Open dcramer/django-compositepks/django/db/backends/postgresql/operations.py/DatabaseOperations.date_extract_sql/swapped operands of `%`