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

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

From
Jean-Christian Imbeault
Date:
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


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

From
Bruce Momjian
Date:
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

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

From
Christoph Dalitz
Date:
>
> 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