RAISE INFO and client_min_messages

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: pgsql-docs(at)postgresql(dot)org
Subject: RAISE INFO and client_min_messages
Date: 2017-03-23 09:03:57
Message-ID: de688a42-115c-4b8c-754c-41f1e3755e15@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2017-03-23 14:39:08 Re: RAISE INFO and client_min_messages
Previous Message vodevsh 2017-03-22 09:29:53 user mapping options list