Removing Context messages - Mailing list pgsql-general

From Fernando Hevia
Subject Removing Context messages
Date
Msg-id 062401c89866$34e506d0$8f01010a@iptel.com.ar
Whole thread Raw
Responses Re: Removing Context messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi list,

I'm having trouble removing some context messages in psql and/or pgadmin.
I made a simple example to show this with 2 functions: f_outer which loops
through a recordset and calls f_inner for each record.

Context messages appear only when the f_inner function logs. (Would be nice
to know why these CONTEXT notices appear).
This is the output I'm getting:

pg=> select f_outer();
NOTICE:  f_outer: 3
NOTICE:  f_inner: 3 = [HEVIA]
CONTEXT:  SQL statement "SELECT  f_inner( $1 )"
PL/pgSQL function "f_outer" line 9 at perform
NOTICE:  f_outer: 6
NOTICE:  f_inner: 6 = [GUIDARA]
CONTEXT:  SQL statement "SELECT  f_inner( $1 )"
PL/pgSQL function "f_outer" line 9 at perform
NOTICE:  f_outer: 7
NOTICE:  f_inner: 7 = [MASTROIANI]
CONTEXT:  SQL statement "SELECT  f_inner( $1 )"
PL/pgSQL function "f_outer" line 9 at perform
 f_outer
---------

(1 row)

I want to get rid of the CONTEXT messages.
I have tried in psql with "\set VERBOSITY terse" without success. No idea on
what to try on pgadmin though.

Thanks,
Fernando

--- Function declaration follows in case it helps ---
CREATE OR REPLACE FUNCTION f_inner(p_client numeric(10)) RETURNS void AS
$BODY$
DECLARE
  r_clients clientes%ROWTYPE;
BEGIN
  SELECT * INTO r_clients FROM clientes WHERE id_cliente = p_client;
  RAISE NOTICE 'f_inner: % = [%]', p_client, r_clients.apellido;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;

CREATE OR REPLACE FUNCTION f_outer() RETURNS void AS
$BODY$
DECLARE
  r_clients clientes%ROWTYPE;
BEGIN
  FOR r_clients IN SELECT * FROM CLIENTES
  LOOP
    RAISE NOTICE 'f_outer: %', r_clients.id_cliente;
    PERFORM f_inner(r_clients.id_cliente);
  END LOOP;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;



pgsql-general by date:

Previous
From: Naz Gassiep
Date:
Subject: Query optimisation
Next
From: Tom Lane
Date:
Subject: Re: Removing Context messages