Python and Advanced PostgreSQL with psycopg2 - Composite primary keys