store data in postgres table