Postgres Get Number From String Sql Functions