Erik Max Francis wrote: > His problem is that cursor.execute does format expansion with %, so a > single % is not legal. Yes, I think psycopg uses paramstyle='pyformat', i.e. it expands parameters in your sql in the usual Python way where % has a special meaning. If you really mean the % sign only, use %%. -- Christoph