making changes in s3gis for psycopg2