| От | Tom Lane |
|---|---|
| Тема | Re: Do not output header line in psql |
| Дата | |
| Msg-id | 31490.1422897438@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Do not output header line in psql (Hans Ginzel <hans@matfyz.cz>) |
| Список | pgsql-novice |
Hans Ginzel <hans@matfyz.cz> writes:
> On Mon, Feb 02, 2015 at 11:48:45AM -0500, Yaser Raja wrote:
>> You can use "grep -v" to exclude this line as follows:
>> echo '\dt' |psql -nqaA -Pfooter=off | grep -v 'List of relations'
> Thank you, but that is ugly. There must not be table/view named like this, etc.
> Which all strings need to be filtered – relations, roles,…?
> Is there a clean solution, please?
I agree that grep seems like a pretty dangerous solution, but
"tail -n +2" would work reliably.
Or, instead of relying on \dt, you could do your own select from
information_schema.tables, and then you'd have more control over
the formatting, column headers, etc.
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера