Added translate function for postgres