client_min_messages not suppressing messages in psql nor pgAdminIII

From: Kevin Field <kev(at)brantaero(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: client_min_messages not suppressing messages in psql nor pgAdminIII
Date: 2014-01-21 15:57:34
Message-ID: 52DE98EE.4000702@brantaero.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This is a cross-post from
http://stackoverflow.com/questions/21238209/info-output-despite-set-client-min-messages-to-warning-just-before
since I'm not getting any answers there yet.

With postgresql-9.0.15 on CentOS 6.5 (accessed via pgAdminIII 1.18.1 on
Win2003), I have a plperlu function that outputs an INFO message. I
want to suppress it during testing (using psql, which also behaves as
below), but I can't even seem to do it from a pgAdminIII query window:

SET client_min_messages TO WARNING;
select my_info_outputting_function('lalala')

I run that and look in the "messages" tab, and there's my INFO message.

(This may appear similar to
http://stackoverflow.com/questions/11404206/how-to-suppress-info-messages-when-running-psql-scripts
, but I don't want to disable INFO messages for my whole session, just
part of it and then set the minimum back to NOTICE.)

What am I doing wrong with the above code snippet? Does
client_min_messages not apply to pl/perlu functions?

UPDATE: upon further investigation, it seems to happen even with plpgsql
functions, not just plperlu functions:

create or replace function my_info_outputting_function() returns
void as $$
begin
raise INFO 'this should not appear...';
return;
end;
$$ language plpgsql;
SET client_min_messages TO WARNING;
select my_info_outputting_function();

I run the above snippet in a pgAdminIII query window and "this should
not appear" appears in the messages tab. Quoi?

Update 2: I also tried [log_min_messages][1] just in case. Same behaviour.

Any ideas?

Thanks,
Kev

[1]:
http://bytes.com/topic/postgresql/answers/423022-supressing-notice-messages-windows-cygwin-only-not-working

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Warten 2014-01-21 16:13:55 Re: pg_upgrade fails: "Mismatch of relation OID in database" - 9.2.4 to 9.3.2
Previous Message Adrian Klaver 2014-01-21 15:36:46 Re: pg_upgrade fails: "Mismatch of relation OID in database" - 9.2.4 to 9.3.2