Added postgres features to code.