Search Postgresql Archives

Re: Formating psql query output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

From: Rich Shepard <rshepard@xxxxxxxxxxxxxxx>
Date: Monday, July 19, 2021 at 1:33 PM

> Is there an option that will retain the '|' separator but exclude the headings?
> Reading the psql document page I don't see such an option.

echo 'select 1,2,3,4;' | psql -At -F'|'

1|2|3|4

 

-A Switches to unaligned output mode. (The default output mode is aligned.) This is equivalent to \pset format unaligned.

-t Turn off printing of column names and result row count footers, etc. This is equivalent to \t or \pset tuples_only.

-F Use separator as the field separator for unaligned output. This is equivalent to \pset fieldsep or \f.

 

HTH




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux