Skip site navigation (1) Skip section navigation (2)

Re: psql record separator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Charley Tiggs <lists(at)tiggs(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: psql record separator
Date: 2008-01-09 22:13:13
Message-ID: 18985.1199916793@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Charley Tiggs <lists(at)tiggs(dot)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?

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Charley TiggsDate: 2008-01-09 22:44:23
Subject: Re: psql record separator
Previous:From: Charley TiggsDate: 2008-01-09 22:06:40
Subject: psql record separator

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group