Re: psql record separator

Поиск
Список
Период
Сортировка
От Charley Tiggs
Тема Re: psql record separator
Дата
Msg-id 47854E47.1060901@tiggs.net
обсуждение исходный текст
Ответ на Re: psql record separator  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql record separator  ("Andrej Ricnik-Bay" <andrej.groups@gmail.com>)
Список pgsql-novice
Tom Lane wrote:
> Charley Tiggs <lists@tiggs.net> writes:
>> I'm trying to create a CRLF record separator using the following syntax:
>> psql -R "\r\n" dbname username -c "select * from foo" > data_file.txt
>
>> But, no matter what I do, it only outputs a newline (\n).  How can I
>> force the separator to be a windows line break (CRLF)?
>
> According to the code, -R only affects the output in "unaligned" output
> mode.  Can you use that?

I added the "-A" switch and it output the string "\r\n" instead of an
actual CRLF.

psql -A -R "\r\n" -t dbname username -c "select * from foo" > data_file.txt

Charley

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql record separator
Следующее
От: "Andrej Ricnik-Bay"
Дата:
Сообщение: Re: psql record separator