Result output: how-to not have header and footers?

Started by Jean-Christian Imbeaultover 23 years ago3 messagesgeneral
Jump to latest
#1Jean-Christian Imbeault
jc@mega-bucks.co.jp

Is it possible in postgresQL to get a query to return only values
without the usual column identifiers header and number of results footer
lines?

I'm trying to pipe the output of a command line query and the
header/footers are causing problems :)

Jc

#2Bruce Momjian
bruce@momjian.us
In reply to: Jean-Christian Imbeault (#1)
Re: Result output: how-to not have header and footers?

Jean-Christian Imbeault wrote:

Is it possible in postgresQL to get a query to return only values
without the usual column identifiers header and number of results footer
lines?

I'm trying to pipe the output of a command line query and the
header/footers are causing problems :)

Sure, psql -t.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Christoph Dalitz
christoph.dalitz@hs-niederrhein.de
In reply to: Bruce Momjian (#2)
Re: Result output: how-to not have header and footers?

Is it possible in postgresQL to get a query to return only values
without the usual column identifiers header and number of results footer
lines?

I'm trying to pipe the output of a command line query and the
header/footers are causing problems :)

you can fine tune the format of query results in psql wiht \pset, eg.

\pset unaligned
\pset fieldsep |
\pset tuples_only

See the man page of psql for details.

Christoph Dalitz