fixed bug in postgres ingest