Re: Problem with Select output

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Problem with Select output
Дата
Msg-id 20041222160647.GA6944@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Problem with Select output  (srini vasan <srinibalaji_82@yahoo.com>)
Список pgsql-general
On Wed, Dec 22, 2004 at 07:50:56AM -0800, srini vasan wrote:

Hi,

>    Can anybody please help me in this?

You could use the replace(text,text,text) function:

alvherre=# create table foo (a text);
CREATE TABLE
alvherre=# insert into foo values ('hola
alvherre'# ');
INSERT 155224 1
alvherre=# select * from foo;
   a
-------
 hola

(1 fila)

alvherre=# select replace(a, '\n', '\\n') from foo;
 replace
---------
 hola\n
(1 fila)

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Para tener más hay que desear menos"

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.0 Beta3 worked, RC1 didn't!
Следующее
От: Fernando Schapachnik
Дата:
Сообщение: Re: Problem with Select output