Re: Controlling psql output - Mailing list pgsql-general

From Ben Chobot
Subject Re: Controlling psql output
Date
Msg-id Pine.LNX.4.64.0905081101400.2388@localhost.localdomain
Whole thread Raw
In response to Controlling psql output  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Responses Re: Controlling psql output
List pgsql-general
On Fri, 8 May 2009, Gauthier, Dave wrote:

> Hi:
>
> Using a single psql command to generate stdout in linux that will be redirected to a file.  Many rows with 1 column
arereturned.  I want no header, no footer, no blank lines at the top or bottom, no initial space before each record.
Thisis what I'm trying... 
>
> psql -P tuples_only=on,footer=off,border=0 mydb
>
> This gets rid of the header and footer OK.  But there is still a blank line as the first line in stdout.  Also, each
recordhas a preceding space before the column value. 
>
> Is there a way to do what I want?

Do you need to have the rows aligned? The -A flag may work for you, though
you might want to specify a different column seperator.



pgsql-general by date:

Previous
From: Christophe
Date:
Subject: Re: Controlling psql output
Next
From: "Gauthier, Dave"
Date:
Subject: Re: Controlling psql output