Re: [HACKERS] How to get 'psql -q' runs really quiet ?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] How to get 'psql -q' runs really quiet ?
Date: 1999-08-15 04:35:52
Message-ID: 199908150435.AAA10998@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
> > I need to run psql really quiet - no messages, just returning RC.
> > psql -q doesn't works as supposed from man page -
> > I'm still getting messages like:
> > NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index .....
>
> The way libpq is set up, NOTICE messages *will* appear on stderr
> no matter what, unless the client app overrides the default notice
> message processor (which is this hugely complicated routine that
> calls fprintf(stderr, ...) ;-)).
>
> Perhaps psql ought to plug in a no-op notice message processor
> if -q is specified.
>

But it is an elog. There is quite, and there is "Don't report any
errors". We don't have a flag for that. In fact, -q only turns of
greeting and goodbye, and -t turns off table headings and row counts.
Can't the user send these massages to /dev/null when starting psql, or
is the problem trimming out those notices? Can't grep -v do that for
them?

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-08-15 13:55:39 Re: Returned mail: User unknown
Previous Message Thomas Lockhart 1999-08-14 23:45:27 Re: [BUGS] UNIQUE constraint no longer works under 6.5.1