Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id EAEE82E005C for ; Fri, 25 Apr 2008 17:46:08 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 71814-05 for ; Fri, 25 Apr 2008 17:46:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by developer.postgresql.org (Postfix) with ESMTP id 2F3932E003D for ; Fri, 25 Apr 2008 17:46:05 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C62AB3642D; Fri, 25 Apr 2008 13:45:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id C49A73647D; Fri, 25 Apr 2008 13:45:59 -0700 (PDT) Date: Fri, 25 Apr 2008 13:45:59 -0700 (PDT) From: Stephan Szabo To: Emi Lu Cc: pgsql-sql@postgresql.org Subject: Re: trim(both) problem? In-Reply-To: <4812402D.7080404@encs.concordia.ca> Message-ID: <20080425134220.S8763@megazone.bigpanda.com> References: <4812402D.7080404@encs.concordia.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/176 X-Sequence-Number: 30715 On Fri, 25 Apr 2008, Emi Lu wrote: > Hi, > > Isn't this a bug about trim both. > > select trim(both '
' from '
ROI Engineering Inc.'); > btrim > --------------------- > OI Engineering Inc. > (1 row) > > > "R" is missing? How? Trim doesn't do what you think it does. The '
' 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.