From: | Ben <bench(at)silentmedia(dot)com> |
---|---|
To: | PostgreSQL-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: problem with pl/pgsql |
Date: | 2003-04-17 15:38:18 |
Message-ID: | 1050593897.10186.2270.camel@purple |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Worked like a charm. Thanks!
On Thu, 2003-04-17 at 07:07, Georg Steffers wrote:
> Hi,
>
> i think its really you whos confused *g*
>
> Am Don, 2003-04-17 um 07.40 schrieb Ben:
> <snip>
> > The stored proc is:
> > CREATE or REPLACE FUNCTION Fetch_ArtistSet_By_Artists(integer[]) RETURNS setof integer AS
> > 'DECLARE
> > artists alias for $1;
> > index integer := 1;
> > total integer := 0;
> > r record;
> > q text := ''select setID from (select setID,count(*) as c from artistSet where'';
> <snip>
>
> ok, the proc returns a setof integer.
>
> <snip>
> >
> > for r in execute q
> > LOOP
> > RETURN next r;
> > END LOOP;
> > RETURN;
> > END;
> <snip>
>
> but this returns a record....so what you need here is
>
> return next r.setID;
>
> Hope this helps you!
>
> Greetings
> Georg Steffers
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-17 16:29:07 | Re: ran an update outside of transaction, can i roll it back in anyway ? |
Previous Message | Jeff MacDonald | 2003-04-17 15:24:42 | ran an update outside of transaction, can i roll it back in anyway ? |