Re: problem with pl/pgsql - Mailing list pgsql-general

From Tom Lane
Subject Re: problem with pl/pgsql
Date
Msg-id 10325.1050588716@sss.pgh.pa.us
Whole thread Raw
In response to problem with pl/pgsql  (Ben <bench@silentmedia.com>)
List pgsql-general
Ben <bench@silentmedia.com> writes:

> CREATE or REPLACE FUNCTION Fetch_ArtistSet_By_Artists(integer[]) RETURNS setof integer AS
> 'DECLARE
> ...
>         r       record;
> ...
>             RETURN next r;

I think you probably need "RETURN next r.setID", since r is a record not
an integer.  The error message seems kind of unhelpful though :-(

            regards, tom lane


pgsql-general by date:

Previous
From: Georg Steffers
Date:
Subject: Re: problem with pl/pgsql
Next
From: "Benjamin RICHARD"
Date:
Subject: Using array parameter in Functions plpgsql