From: | "Ismael (dot)(dot)(dot)(dot)" <ismaelpsp(at)hotmail(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | How to create my own result set? |
Date: | 2008-07-16 02:04:38 |
Message-ID: | BLU103-W5056088F5E67260F5CBDA4A38F0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi there,
I'm making a really weird stored procedure which makes use of about 5 tables...
and I need to create my own result set based on the computed result of various
FOR loops.
Does anyone knows how can I do that using PL/pgSQL?
I "think" I need to declare a couple of variables that accept APPENDING but I
don't know if that's possible.
Lets say for example:
CREATE OR REPLACE FUNCTION weirdFunction() RETURNS AS $$
DECLARE
column1 ;
column2 ;
BEGIN
--first row
column1.append('something');
column2.append('something');
--second row
column1.append('again');
column2.append('again');
END;
$$ LANGUAGE plpgsql;
So the result of that should be
something something
again again
Is it possible to do something like that?
Tanks in advance
_________________________________________________________________
Tenemos lo que búscas…JUEGOS.
http://club.prodigymsn.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2008-07-16 02:34:25 | Re: C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP) |
Previous Message | Alvaro Herrera | 2008-07-16 01:37:32 | Re: C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP) |