Introduction to PostgreSQL: Migrating our App - Psycopg2 cursors and query parameters