Re: How to suppress NOTICE messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "O(dot)B(dot)" <funkjunk(at)bellsouth(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to suppress NOTICE messages
Date: 2007-04-06 17:11:17
Message-ID: 14658.1175879477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"O.B." <funkjunk(at)bellsouth(dot)net> writes:
> How does one suppress NOTICE messages from appearing in stderr? I
> have the following command and it appears that setting
> client_min_messages to WARNING does not work.

> psql -U postgres -d mytestdb -f mytest.sql -v
> client_min_messages=WARNING -W

You seem to be confusing psql variables (\set) with server configuration
parameters (SET) ... there is no connection there at all.

What you need is a SQL command "SET client_min_messages=WARNING;".
If you don't want to put it in your scripts, consider a ~/.psqlrc
file, or use ALTER USER or ALTER DATABASE to make it default at
those granularities, or change the installation's default in
postgresql.conf. See
http://www.postgresql.org/docs/8.2/static/config-setting.html
for more ways to control configuration parameters.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-04-06 17:15:35 Re: YTA Time Zone Question
Previous Message Harpreet Dhaliwal 2007-04-06 17:10:13 No of triggers of one single table