Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 6FCA02E004B for ; Fri, 25 Apr 2008 18:02:58 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 04954-08 for ; Fri, 25 Apr 2008 18:02:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from pyxis.powervt.com.ar (host3.powervt.com.ar [200.43.63.66]) by developer.postgresql.org (Postfix) with ESMTP id 70CEB2E005C for ; Fri, 25 Apr 2008 18:02:52 -0300 (ADT) Received: from pcfhevia ([201.216.249.98]) by pyxis.powervt.com.ar (IPGroup Mail Server) with ESMTP id 1OT48953; Fri, 25 Apr 2008 18:02:49 -0300 From: "Fernando Hevia" To: "'Emi Lu'" Cc: References: <4812402D.7080404@encs.concordia.ca> <20080425134220.S8763@megazone.bigpanda.com> Subject: Re: trim(both) problem? Date: Fri, 25 Apr 2008 18:03:14 -0300 Organization: IP-TEL Message-ID: <031701c8a717$c7458e90$8f01010a@iptel.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 In-Reply-To: <20080425134220.S8763@megazone.bigpanda.com> Thread-Index: AcinFWiIfcrlKYszSJ6AUiDknPHZdAAAeN1w X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/177 X-Sequence-Number: 30716 > -----Mensaje original----- > De: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org] En nombre de Stephan Szabo > Enviado el: Viernes, 25 de Abril de 2008 17:46 > Para: Emi Lu > CC: pgsql-sql@postgresql.org > Asunto: Re: [SQL] trim(both) problem? > > 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. > You could probably use instead: select replace('
ROI Engineering Inc.', '
', '')