fixing up python and postgres