pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mduyunov@avito.ru
To: pgsql-bugs@postgresql.org
Subject: BUG #9186: CONTEXT log line still appears when turned off
Date: Tue, 11 Feb 2014 14:32:10 +0000
Message-ID: <20140211143210.2708.38731@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      9186
Logged by:          Maxim Duyunov
Email address:      mduyunov@avito.ru
PostgreSQL version: 9.3.2
Operating system:   Debian GNU/Linux
Description:        

Hello!

I wanted to call function inside the other one and write some notices.
On purpose to switch off "STATEMENT" and "CONTEXT" log lines I set
log_min_error_statement = 'warning' on function,
but there are still CONTEXT log lines, when I call function via perform or
execute.
It looks like a bug.

Even with setting "log_min_error_statement" set for functions: test_call* it
still shows "statement" and "context".

Please, advice me how to switch off "statement" and "context" log lines only
for "notice".

Sincerely,
Maxim Duyunov.


Server default settings:
select name, setting from pg_settings where name ~ 'log_min|verbo'
"log_error_verbosity";"default"
"log_min_duration_statement";"-1"
"log_min_error_statement";"notice"
"log_min_messages";"notice"

PostgreSQL versions:
"PostgreSQL 9.2.6 on x86_64-unknown-linux-gnu, compiled by gcc (Debian
4.4.5-8) 4.4.5, 64-bit"
"Linux avi-sql09 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64
GNU/Linux"
"Debian GNU/Linux 6.0"
----
"PostgreSQL 9.3.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.8.real
(Debian 4.8.2-8) 4.8.2, 64-bit"
"Linux seb 3.12-1-amd64 #1 SMP Debian 3.12.6-2 (2013-12-29) x86_64
GNU/Linux"
"Debian GNU/Linux jessie/sid"

----
CREATE OR REPLACE FUNCTION test_func(i_name text) RETURNS void AS
$$
   begin
      raise notice 'Hello, %', i_name;
   end;
$$
language plpgsql
set log_min_error_statement = 'warning';
----
CREATE OR REPLACE FUNCTION test_call() RETURNS void AS
$$
   begin
      execute 'select test_func(''Maxim'')';
   end;
$$
language plpgsql
set log_min_error_statement = 'warning';
----
CREATE OR REPLACE FUNCTION test_call2() RETURNS void AS
$$
   begin
      perform test_func('Maxim');
   end;
$$
language plpgsql
set log_min_error_statement = 'warning';
----
SELECT test_func('Maxim');
SELECT test_call();
SELECT test_call2();
----
2014-02-11 17:58:53 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) NOTICE:  Hello,
Maxim
----
2014-02-11 17:58:24 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) NOTICE:  Hello,
Maxim
2014-02-11 17:58:24 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) CONTEXT:  SQL
statement "select test_func('Maxim')"
	PL/pgSQL function test_call() line 3 at EXECUTE statement
----
2014-02-11 18:03:42 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) NOTICE:  Hello,
Maxim
2014-02-11 18:03:42 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) CONTEXT:  SQL
statement "SELECT test_func('Maxim')"
	PL/pgSQL function test_call2() line 3 at PERFORM
----


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <20140211143210.2708.38731@wrigleys.postgresql.org>
Permalink:  ../20140211143210.2708.38731@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140211143210.2708.38731@wrigleys.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mduyunov@avito.ru
  Subject: Re: BUG #9186: CONTEXT log line still appears when turned off
  In-Reply-To: <20140211143210.2708.38731@wrigleys.postgresql.org>
  References: <20140211143210.2708.38731@wrigleys.postgresql.org>

* 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