Re: plpgsql: RAISE - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: plpgsql: RAISE
Date
Msg-id 3B69CDB8.627575D6@archonet.com
Whole thread Raw
In response to Re: plpgsql: RAISE  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> Can I ask where we are on this?

Sure - posted a follow up to the list a while ago. Subject was

"RAISE <level> <expr> <params>: state of play and request for advice"

Currently, this works:

CREATE FUNCTION foo_raise_loop(text) RETURNS text AS '
DECLARE   a ALIAS FOR $1;   i integer;   myrec RECORD;
BEGIN   i:=0;   FOR myrec IN SELECT * FROM colours LOOP       i:=i+1;       RAISE NOTICE a || '' : '' || '' colour % is
''|| myrec.c_name ||
 
''.'', i, myrec.c_id;   END LOOP;   RETURN ''done''::text;
END;' LANGUAGE 'plpgsql';

More details in the msg of a few days ago. Busy at the moment, probably
for the next week at least. If you'd like the patch against current CVS
let me know and I'll try and do it this weekend.

- Richard Huxton


pgsql-hackers by date:

Previous
From: RCrowe@stbernard.com
Date:
Subject: Re: Any hints on how to limit WAL file disk usage?
Next
From: Turbo Fredriksson
Date:
Subject: PL/pgSQL: Return multiple rows