From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: pgsql-docs@postgresql.org
Subject: RAISE INFO and client_min_messages
Date: Thu, 23 Mar 2017 12:03:57 +0300
Message-ID: <de688a42-115c-4b8c-754c-41f1e3755e15@postgrespro.ru> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
Hello,
When working with RAISE statement in PL/pgSQL, I found a strange
situation with client_min_messages.
According to the documentation, client_min_messages does not include the
value 'INFO'.
Column enumval in pg_settings also does not contain this value:
=# select name, enumvals from pg_settings where name =
'client_min_messages';
name | enumvals
---------------------+---------------------------------------------------------------
client_min_messages |
{debug5,debug4,debug3,debug2,debug1,log,notice,warning,error}
But when we run RAISE INFO statement in PL/pgSQL, client receive a
message with any setting of client_min_messages, even most silent 'ERROR':
=# set client_min_messages = 'error';
SET
=# do $$begin raise info 'Hello, World!'; end;$$;
INFO: Hello, World!
DO
Moreover, this parameter can be set to 'INFO':
=# set client_min_messages = 'info';
SET
In this case the behavior does not changes from default 'NOTICE'.
Do we need to change something in the documentation?
P.S. log_min_messages contains INFO and works accordingly.
--
-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: p.luzanov@postgrespro.ru
Subject: Re: RAISE INFO and client_min_messages
In-Reply-To: <de688a42-115c-4b8c-754c-41f1e3755e15@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox