Re: How to suppress NOTICE messages - Mailing list pgsql-general

From Tom Lane
Subject Re: How to suppress NOTICE messages
Date
Msg-id 14658.1175879477@sss.pgh.pa.us
Whole thread Raw
In response to How to suppress NOTICE messages  ("O.B." <funkjunk@bellsouth.net>)
List pgsql-general
"O.B." <funkjunk@bellsouth.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

pgsql-general by date:

Previous
From: "Harpreet Dhaliwal"
Date:
Subject: No of triggers of one single table
Next
From: Tom Lane
Date:
Subject: Re: YTA Time Zone Question