Обсуждение: Avoid the interpretation of \n in the psql output

Поиск
Список
Период
Сортировка

Avoid the interpretation of \n in the psql output

От
"Bruno BAGUETTE"
Дата:
Hello,

How can I avoid the interpretation of \n in psql ?

If I have a data inserted like this : 'The\ndata\nis\nthere', psql
display

The
data
is
there

Is there a way to have psql DISPLAYING \n but NOT interpreting it ?

I'm using psql on PostgreSQL 6.5.2, just the time to extract all the
datas from one table....  :-/

Thanks in advance for your help !

-------------------------------------
Bruno BAGUETTE - pgsql-ml@baguette.net


Re: Avoid the interpretation of \n in the psql output

От
Bruce Momjian
Дата:
Sure, insert using \\n (double-backslash).

---------------------------------------------------------------------------

Bruno BAGUETTE wrote:
> Hello,
>
> How can I avoid the interpretation of \n in psql ?
>
> If I have a data inserted like this : 'The\ndata\nis\nthere', psql
> display
>
> The
> data
> is
> there
>
> Is there a way to have psql DISPLAYING \n but NOT interpreting it ?
>
> I'm using psql on PostgreSQL 6.5.2, just the time to extract all the
> datas from one table....  :-/
>
> Thanks in advance for your help !
>
> -------------------------------------
> Bruno BAGUETTE - pgsql-ml@baguette.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073