what's the message: CONTEXT: PL/pgSQL function "proc_sub_b" line 7 at assignment

Started by Gary Fuover 15 years ago2 messagesgeneral
Jump to latest
#1Gary Fu
gfu@sigmaspace.com

Hi,

Why do I get the message in Subject when I do 'select proc_sub_b()'
under psql ? If I comment out the RAISE statement in proc_sub_a then I
don't see the message.

Thanks,
Gary

int_admin.modaps_int> select proc_sub_b();
INFO: id=11
CONTEXT: PL/pgSQL function "proc_sub_b" line 7 at assignment
proc_sub_b
------------
0
(1 row)

------------------------------------------------------------
CREATE OR REPLACE FUNCTION proc_sub_a(
v_id int
) RETURNS INTEGER AS $$
DECLARE
BEGIN

RAISE INFO 'id=%', v_id;

return 1;

end;
$$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION proc_sub_b(
) RETURNS INTEGER AS $$
DECLARE
v_ret int;
BEGIN

v_ret := proc_sub_a(11);

return 0;

end;
$$ LANGUAGE plpgsql;

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Gary Fu (#1)
Re: what's the message: CONTEXT: PL/pgSQL function "proc_sub_b" line 7 at assignment

On Wednesday 29 December 2010 2:19:40 pm Gary Fu wrote:

Hi,

Why do I get the message in Subject when I do 'select proc_sub_b()'
under psql ? If I comment out the RAISE statement in proc_sub_a then I
don't see the message.

Thanks,
Gary

It is just giving the context for the raising of the INFO notice. You can change
that behavior by changing log_error_verbosity () See here for more detail:
http://www.postgresql.org/docs/9.0/interactive/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT

--
Adrian Klaver
adrian.klaver@gmail.com