Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Pgadmin Support > Re: Removing Co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 9 Topic 1993 of 2158
Post > Topic >>

Re: Removing Context Messages

by Erwin Brandstetter <brsaweda@[EMAIL PROTECTED] > Apr 8, 2008 at 09:36 AM

On Apr 8, 3:01 pm, fhe...@[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
 




 9 Posts in Topic:
Removing Context Messages
fhevia@[EMAIL PROTECTED]   2008-04-07 22:55:46 
Re: Removing Context Messages
mshapiro51@[EMAIL PROTECT  2008-04-07 21:01:19 
Re: Removing Context Messages
fhevia@[EMAIL PROTECTED]   2008-04-07 23:35:49 
Re: Removing Context Messages
guillaume@[EMAIL PROTECTE  2008-04-08 08:22:57 
Re: Removing Context Messages
julius@[EMAIL PROTECTED]   2008-04-08 09:29:00 
Re: Removing Context Messages
fhevia@[EMAIL PROTECTED]   2008-04-08 10:01:44 
Re: Removing Context Messages
fhevia@[EMAIL PROTECTED]   2008-04-08 10:08:27 
Re: Removing Context Messages
Erwin Brandstetter <br  2008-04-08 09:36:41 
Re: Removing Context Messages
fhevia@[EMAIL PROTECTED]   2008-04-08 14:19:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 18:07:55 CST 2008.