Fix issues in resource psycopg2 resource defs