Upgrade to functionality with postgres