Adding functions needed for postgresql integration.