Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0F3FD9FB24B for ; Wed, 21 Mar 2007 00:03:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 72733-01 for ; Wed, 21 Mar 2007 00:03:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 3BCC99FA618 for ; Wed, 21 Mar 2007 00:03:07 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l2L32x2I043718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Mar 2007 20:03:02 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l2L32xk5037852; Tue, 20 Mar 2007 21:02:59 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l2L32x8K037851; Tue, 20 Mar 2007 21:02:59 -0600 (MDT) (envelope-from mfuhr) Date: Tue, 20 Mar 2007 21:02:59 -0600 From: Michael Fuhr To: Judith Cc: pgsql-sql@postgresql.org Subject: Re: Substitute Message-ID: <20070321030258.GA36429@winnie.fuhr.org> References: <46007447.8010202@correolux.com.mx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46007447.8010202@correolux.com.mx> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/278 X-Sequence-Number: 27916 On Tue, Mar 20, 2007 at 05:54:47PM -0600, Judith wrote: > somebody knows, how I can substitute in a query if a field contains a > character that I want to be shown with other character? > > for example if I have a \n I want to shows me a ~ in the result of the > select One way is with translate(). See "String Functions and Operators" in the documentation for more information. http://www.postgresql.org/docs/8.2/interactive/functions-string.html -- Michael Fuhr