Re: plpgsql function returning SETOF - Mailing list pgsql-novice

From Tom Lane
Subject Re: plpgsql function returning SETOF
Date
Msg-id 15046.1135191044@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpgsql function returning SETOF  ("Johannes Brügmann" <johannes@jottbee.org>)
Responses Re: plpgsql function returning SETOF
List pgsql-novice
"Johannes Br�gmann" <johannes@jottbee.org> writes:
> sorry, i missed the error message:

>       bruegmann@traffic_nrw=# select feiertage(NULL);
>       ERROR:  set-valued function called in context that cannot accept a set
>       CONTEXT:  PL/pgSQL function "feiertage" line 30 at return next

You need to do
    select * from your_function(...);
not just
    select your_function(...);

            regards, tom lane

pgsql-novice by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: plpgsql function returning SETOF
Next
From: "Johannes Brügmann"
Date:
Subject: Re: plpgsql function returning SETOF