script for submitting data to postgres