On Apr 8, 3:01 pm, [EMAIL PROTECTED] ("Fernando Hevia") wrote: (...) > --- 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;
Regardless of your request about silencing context messages (did not look into that): maybe SQL along these lines would do the job for you? select id_cliente, array_to_string(ARRAY(SELECT apellido from clientes c0 WHERE c0.id_cliente = c.id_cliente), E'\n') from clientes c group by id_cliente Regards Erwin -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support