Search Postgresql Archives

Removing Context messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux