Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqyf7-0000mb-Hb for pgsql-docs@arkaria.postgresql.org; Thu, 23 Mar 2017 09:04:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cqyf6-00050O-RN for pgsql-docs@arkaria.postgresql.org; Thu, 23 Mar 2017 09:04:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqyf6-00050F-Du for pgsql-docs@postgresql.org; Thu, 23 Mar 2017 09:04:04 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqyf2-0006cE-Ox for pgsql-docs@postgresql.org; Thu, 23 Mar 2017 09:04:03 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 2004B21C26E5 for ; Thu, 23 Mar 2017 12:03:58 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru From: Pavel Luzanov Subject: RAISE INFO and client_min_messages To: pgsql-docs@postgresql.org Message-ID: Date: Thu, 23 Mar 2017 12:03:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------233AA5491F360199527FCB49" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org This is a multi-part message in MIME format. --------------233AA5491F360199527FCB49 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------233AA5491F360199527FCB49 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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
--------------233AA5491F360199527FCB49--