Re: Formating psql query output

Поиск
Список
Период
Сортировка
От David Santamauro
Тема Re: Formating psql query output
Дата
Msg-id BL0PR02MB47060457028EC865DB81CEB2FCE19@BL0PR02MB4706.namprd02.prod.outlook.com
обсуждение исходный текст
Ответ на Formating psql query output  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Formating psql query output [RESOLVED]  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general

 

From: Rich Shepard <rshepard@appl-ecosys.com>
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



В списке pgsql-general по дате отправления:

Предыдущее
От: "Basques, Bob (CI-StPaul)"
Дата:
Сообщение: RE: Formating psql query output
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Formating psql query output