Added better data extractor into postgres