convert string to text for posgre