Revert back to using postgresql specific functions. dbx functions should be changed