How to hide NOTICE messages in psql.exe ?

Started by Michal Szymanskialmost 20 years ago5 messagesgeneral
Jump to latest
#1Michal Szymanski
dyrex@poczta.onet.pl

Hi
I use psql.exe program under windows and I would like that program will
hide all NOTICE messages. Is there any psql.exe parameter ? Because of
big number of NOTICE messages is very hard to find errors.

Michal Szymanski
http://blog.szymanskich.net

#2Michael Fuhr
mike@fuhr.org
In reply to: Michal Szymanski (#1)
Re: How to hide NOTICE messages in psql.exe ?

On Wed, Jul 05, 2006 at 07:12:02AM -0700, Szymic1 wrote:

I use psql.exe program under windows and I would like that program will
hide all NOTICE messages. Is there any psql.exe parameter ? Because of
big number of NOTICE messages is very hard to find errors.

Does "SET client_min_messages TO warning" do what you want? You
might also be interested in psql's -q option (or "\set QUIET").

http://www.postgresql.org/docs/8.1/interactive/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHEN
http://www.postgresql.org/docs/8.1/interactive/app-psql.html

--
Michael Fuhr

#3Michal Szymanski
dyrex@poczta.onet.pl
In reply to: Michael Fuhr (#2)
Re: How to hide NOTICE messages in psql.exe ?

might also be interested in psql's -q option (or "\set QUIET").

I use -q but I've got e.g

Z:\>psql.exe -q -d ff -h localhost -p 5432 -U postgres
0<D:\ff\centralny\src\db\processing_utils.sql
NOTICE: type reference ff.alias.mask%TYPE converted to character
varying
NOTICE: type reference freeconet.logic_list_item.conv%TYPE converted
to charact
er varying
NOTICE: type reference ff.logic_list_item.conv%TYPE converted to
charact
er varying
NOTICE: type reference ff.alias.mask%TYPE converted to character
varying
NOTICE: type reference ff.account.user_name%TYPE converted to
character
varying
NOTICE: type reference ff.alias.mask%TYPE converted to character
varying

I would like to hide lines with NOTICE

#4Richard Broersma Jr
rabroersma@yahoo.com
In reply to: Michal Szymanski (#3)
Re: How to hide NOTICE messages in psql.exe ?

might also be interested in psql's -q option (or "\set QUIET").

I use -q but I've got e.g

Z:\>psql.exe -q -d ff -h localhost -p 5432 -U postgres
0<D:\ff\centralny\src\db\processing_utils.sql
NOTICE: type reference ff.alias.mask%TYPE converted to character
varying
NOTICE: type reference freeconet.logic_list_item.conv%TYPE converted
to charact
er varying
NOTICE: type reference ff.logic_list_item.conv%TYPE converted to
charact
er varying
NOTICE: type reference ff.alias.mask%TYPE converted to character
varying
NOTICE: type reference ff.account.user_name%TYPE converted to
character
varying
NOTICE: type reference ff.alias.mask%TYPE converted to character
varying

I would like to hide lines with NOTICE

Would making the following changes to you postgresql.conf help?

redirect_stderr = true
client_min_messages = warning

You may need to restart PostgreSQL for these changes to take effect.

Regards,
Richard Broersma Jr.

#5Michael Fuhr
mike@fuhr.org
In reply to: Michal Szymanski (#3)
Re: How to hide NOTICE messages in psql.exe ?

On Wed, Jul 05, 2006 at 07:48:21AM -0700, Szymic1 wrote:

might also be interested in psql's -q option (or "\set QUIET").

I use -q but I've got e.g

Z:\>psql.exe -q -d ff -h localhost -p 5432 -U postgres
0<D:\ff\centralny\src\db\processing_utils.sql
NOTICE: type reference ff.alias.mask%TYPE converted to character varying

[...]

I would like to hide lines with NOTICE

I mentioned -q as something you might want to use in addition
to client_min_messages, not instead of it. My previous message
showed how to suppress NOTICE and provided a link to the relevant
documentation.

--
Michael Fuhr