postgres and TS working

working, although very barebones, and need to figure out how can make
work in test environment