Update etl script to work in postgres.