Re: Controlling psql output
От | Gauthier, Dave |
---|---|
Тема | Re: Controlling psql output |
Дата | |
Msg-id | 482E80323A35A54498B8B70FF2B87980040106E9E0@azsmsx504.amr.corp.intel.com обсуждение исходный текст |
Ответ на | Re: Controlling psql output (Ben Chobot <bench@silentmedia.com>) |
Список | pgsql-general |
-A -t worked great. Thanks ! -dave -----Original Message----- From: Ben Chobot [mailto:bench@silentmedia.com] Sent: Friday, May 08, 2009 2:03 PM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Controlling psql output 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 по дате отправления: