Re: plpgsql function returning SETOF

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Johannes Br gmann" <johannes(at)jottbee(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: plpgsql function returning SETOF
Date: 2005-12-21 18:50:44
Message-ID: 15046.1135191044@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Johannes Brgmann" <johannes(at)jottbee(dot)org> writes:
> sorry, i missed the error message:

> bruegmann(at)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Johannes Brgmann 2005-12-21 18:57:15 Re: plpgsql function returning SETOF
Previous Message Andreas Kretschmer 2005-12-21 18:44:57 Re: plpgsql function returning SETOF