From: | Clodoaldo Pinto Neto <clodoaldo_pinto(at)yahoo(dot)com(dot)br> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | How copy a new line char to a file? |
Date: | 2004-08-09 00:15:07 |
Message-ID: | 20040809001507.73273.qmail@web40905.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-08-09 00:27:05 | Re: Error >>syntax error<< at >>$1<< at character 53 |
Previous Message | Kris Jurka | 2004-08-09 00:14:53 | Re: pg jdbc driver |