Re: Do not output header line in psql

From: Hans Ginzel <hans(at)matfyz(dot)cz>
To: Yaser Raja <yrraja(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Do not output header line in psql
Date: 2015-02-02 17:06:41
Message-ID: 20150202170640.GB52451@artax.karlin.mff.cuni.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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'
> Regards
> Yaser

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?

Regards,
H.

>
> On Mon, Feb 2, 2015 at 4:00 AM, Hans Ginzel <[1]hans(at)matfyz(dot)cz> wrote:
>
> Hello!
> How can I please get rid of the header line "List of relations" in
> the example below, please?
> echo '\dt' |psql -nqaA -Pfooter=off
> I can use the -t option, but it also removes the column headers I
> want to keep.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2015-02-02 17:17:18 Re: Do not output header line in psql
Previous Message Yaser Raja 2015-02-02 16:48:45 Re: Do not output header line in psql