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 via email to