RAISE NOTICE ... and CONTEXT field of the error report.

Started by Dmitriy Igrishinabout 13 years ago3 messagesgeneral
Jump to latest
#1Dmitriy Igrishin
dmitigr@gmail.com

Hey all,

Is there way to turn off printing of CONTEXT field of the error report
in the following case:

create or replace function foo() returns void language plpgsql as $$
begin
raise notice 'notice from foo()';
end;
$$;
create or replace function bar() returns void language plpgsql as $$
begin
perform foo();
end;
$$;

wog=# select foo();
NOTICE: notice from foo()
foo
-----

(1 row)

wog=# select bar();
NOTICE: notice from foo()
CONTEXT: SQL statement "SELECT foo()"
PL/pgSQL function bar() line 3 at PERFORM
bar
-----

(1 row)

If it does not possible, I would like to have this feature. From the POV
of the PL/pgSQL user I think it should be customizable mode of PL/pgSQL.

--
// Dmitriy.

#2Marc Schablewski
ms@clickware.de
In reply to: Dmitriy Igrishin (#1)
Re: RAISE NOTICE ... and CONTEXT field of the error report.

Am 22.01.2013 14:59, schrieb Dmitriy Igrishin:

Hey all,

Is there way to turn off printing of CONTEXT field of the error report

I think, this might help: http://www.depesz.com/2008/07/12/suppressing-context-lines-in-psql/

Marc

#3Dmitriy Igrishin
dmitigr@gmail.com
In reply to: Marc Schablewski (#2)
Re: RAISE NOTICE ... and CONTEXT field of the error report.

Hey Marc,

2013/1/22 Marc Schablewski <ms@clickware.de>

Am 22.01.2013 14:59, schrieb Dmitriy Igrishin:

Hey all,

Is there way to turn off printing of CONTEXT field of the error report

I think, this might help:
http://www.depesz.com/2008/07/12/suppressing-context-lines-in-psql/

Marc

I am sorry for thoughtlessness!

It's really should be filtered by client application.
Thanks for point!

--
// Dmitriy.