Added postgres implementation