Another attempt at psycopg2 usage