Re: psql -F - Mailing list pgsql-sql

From Joe Conway
Subject Re: psql -F
Date
Msg-id 455C5B6E.1070403@joeconway.com
Whole thread Raw
In response to Re: psql -F  (T E Schmitz <mailreg@numerixtechnology.de>)
Responses Re: psql -F
Re: psql -F
List pgsql-sql
T E Schmitz wrote:
> Alvaro Herrera wrote:
> 
>> T E Schmitz wrote:
>>
>>> I have written a shell script to export data:
>>>
>>> psql -A -t -U $DBUSER -d $DB -c "$QUERY" -F ' '
>>>
>>> Currently, I am using spaces as field separator but what I really 
>>> want is tabs.
>>>
>>> How can I specify a TAB character with the -F option?

> Sorry for having gone off-topic. I was just hoping something like \t 
> could be passed, too.
> 

Try:   psql -A -t -U $DBUSER -d $DB -c "$QUERY" -F $'\t'

see:   man bash

HTH,

Joe


pgsql-sql by date:

Previous
From: T E Schmitz
Date:
Subject: Re: psql -F
Next
From: "Jonah H. Harris"
Date:
Subject: Re: recursive SQL and with clause