pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Judith <jaltamirano@correolux.com.mx>
Cc: pgsql-sql@postgresql.org
Subject: Re: Substitute
Date: Tue, 20 Mar 2007 21:02:59 -0600
Message-ID: <20070321030258.GA36429@winnie.fuhr.org> (raw)
In-Reply-To: <46007447.8010202@correolux.com.mx>
References: <46007447.8010202@correolux.com.mx>

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



view thread (3+ messages)

Message-ID: <20070321030258.GA36429@winnie.fuhr.org>
Permalink:  ../20070321030258.GA36429@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20070321030258.GA36429@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, jaltamirano@correolux.com.mx
  Subject: Re: Substitute
  In-Reply-To: <20070321030258.GA36429@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox