How copy a new line char to a file? - Mailing list pgsql-general

From Clodoaldo Pinto Neto
Subject How copy a new line char to a file?
Date
Msg-id 20040809001507.73273.qmail@web40905.mail.yahoo.com
Whole thread Raw
Responses Re: How copy a new line char to a file?  (Clodoaldo Pinto Neto <clodoaldo_pinto@yahoo.com.br>)
List pgsql-general
Hi all,

I'm trying to copy a table with a text field column containing a new
line char to a file:

ksDesenv=# create table page(line text) without oids;
CREATE TABLE
ksDesenv=# insert into page (line)
values('1stline'||chr(10)||'2ndline');
INSERT 0 1
ksDesenv=# select * from page;
      line
-----------------
 1stline
2ndline
(1 registro)

ksDesenv=# copy page to '/var/www/html/kakaostats/page.txt';
COPY

But this is what the page.txt file looks like:

1stline\n2ndline

What can I do to make the copy to command insert an actual new line
char?

Regards,
Clodoaldo Pinto Neto





_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/

pgsql-general by date:

Previous
From: Kris Jurka
Date:
Subject: Re: pg jdbc driver
Next
From: Tom Lane
Date:
Subject: Re: Error >>syntax error<< at >>$1<< at character 53