Re: is there a function which elminates spaces?

From: "codeWarrior" <gpatnude(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: is there a function which elminates spaces?
Date: 2005-10-24 16:15:55
Message-ID: djj18u$297u$2@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SELECT trim(trailing ' ' from city_name) AS city_name FROM sys_cities;

You might consider reading the manual as there are a multitude of string
manipulation functions built into postgreSQL....

"Pierre Couderc" <pierre(at)couderc(dot)ccNOSPAM> wrote in message
news:djidc4$2hgk$1(at)biggoron(dot)nerim(dot)net(dot)(dot)(dot)
> In a WHERE clause, I want to to compare strings ignoring the spaces inside
> them. Is therd a function to do that? I do not find it in the
> documentation.
>
> SELECT ... WHERE (ignore_spaces(table.phone_number) ~* igore_spaces(?));
>
> would be fine but ignore_space() does not exist!
> Maybe there is a solution based on regular epxression, but I do not see
> it.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johan Wehtje 2005-10-24 16:27:44 Why is this function wrong
Previous Message Csaba Nagy 2005-10-24 15:27:39 Re: insertion becoming slow