Add postgres functionality