Skip site navigation (1) Skip section navigation (2)

Re: trim(both) problem?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: trim(both) problem?
Date: 2008-04-25 20:45:59
Message-ID: 20080425134220.S8763@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Fri, 25 Apr 2008, Emi Lu wrote:

> Hi,
>
> Isn't this a bug about trim both.
>
>   select trim(both '<BR/>' from '<BR/>ROI Engineering Inc.');
>          btrim
> ---------------------
>   OI Engineering Inc.
> (1 row)
>
>
> "R" is missing? How?

Trim doesn't do what you think it does. The '<BR/>' in the above is not a
string to remove it is a list of characters to remove.  Thus, the R is
removed as it matches a character given.



In response to

Responses

pgsql-sql by date

Next:From: Fernando HeviaDate: 2008-04-25 21:03:14
Subject: Re: trim(both) problem?
Previous:From: Tom LaneDate: 2008-04-25 20:44:30
Subject: Re: trim(both) problem?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group