Re: Controlling psql output
От | Jasen Betts |
---|---|
Тема | Re: Controlling psql output |
Дата | |
Msg-id | gu8pj6$via$2@reversiblemaps.ath.cx обсуждение исходный текст |
Ответ на | Controlling psql output ("Gauthier, Dave" <dave.gauthier@intel.com>) |
Список | pgsql-general |
On 2009-05-08, Gauthier, Dave <dave.gauthier@intel.com> wrote: > --_000_482E80323A35A54498B8B70FF2B87980040106E94Bazsmsx504amrc_ > Content-Type: text/plain; charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > Hi: > > Using a single psql command to generate stdout in linux that will be redire= > cted to a file. Many rows with 1 column are returned. I want no header, n= > o footer, no blank lines at the top or bottom, no initial space before each= > record. This is what I'm trying... > > psql -P tuples_only=3Don,footer=3Doff,border=3D0 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 record has a preceding space befo= > re the column value. > > Is there a way to do what I want? use "copy (select ...) to stdout" instead of "select ..." requires 8.3 or greater. as a bonus nulls and control characters re represented unambiguously.
В списке pgsql-general по дате отправления: