How copy a new line char to a file?

Поиск
Список
Период
Сортировка
От Clodoaldo Pinto Neto
Тема How copy a new line char to a file?
Дата
Msg-id 20040809001507.73273.qmail@web40905.mail.yahoo.com
обсуждение исходный текст
Ответы Re: How copy a new line char to a file?  (Clodoaldo Pinto Neto <clodoaldo_pinto@yahoo.com.br>)
Список 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 по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: pg jdbc driver
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error >>syntax error<< at >>$1<< at character 53