Re: Silencing 'NOTICE' messages for PRIMARY KEY - Mailing list pgsql-general

From Richard Huxton
Subject Re: Silencing 'NOTICE' messages for PRIMARY KEY
Date
Msg-id 003901c08489$c5a84860$1001a8c0@archonet.com
Whole thread Raw
In response to Silencing 'NOTICE' messages for PRIMARY KEY  (Rajit Singh <singh.raj@studychoice.com>)
Responses Re: Silencing 'NOTICE' messages for PRIMARY KEY
List pgsql-general
----- Original Message -----
From: "Rajit Singh" <singh.raj@studychoice.com>


> Hi,
>
> I just have a small question.  I discovered the psql -q option, which is
great... but I wanna get rid of *all* output that isn't something I need to
look at after the 1000th time I've run a particular echo 'blah' | psql.
>
> With the PRIMARY KEY options in some of my schemas, when I use pg_dump
<blah> | psql -q, I get:
>
> NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'blah_pkey'
for table 'blah'
>
Try piping the error stream through sed. Something like:

  sed -e'/NOTICE/d'

will remove all lines containing NOTICE from the output.

HTH

- Richard Huxton


pgsql-general by date:

Previous
From: Guillaume Lémery
Date:
Subject: Re: Troubles with performances
Next
From: "Dan Wilson"
Date:
Subject: Re: System tables