Re: Function Returning SETOF Problem - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Function Returning SETOF Problem
Date
Msg-id 20031217162230.A73086@megazone.bigpanda.com
Whole thread Raw
In response to Function Returning SETOF Problem  (Ron St-Pierre <rstpierre@syscor.com>)
Responses Re: Function Returning SETOF Problem
List pgsql-general
On Wed, 17 Dec 2003, Ron St-Pierre wrote:

> On a daily basis I place a lot of data into the empty table dailyList,
> and from that data update certain fields in currentList. I thought that
> using a function would be a good way to do this(?). However I get the
> following error when I run updateCurrentData():
>    ERROR:  set-valued function called in context that cannot accept a set
>    CONTEXT:  PL/pgSQL function "updatecurrentcata" line 6 at return next
> I've googled and tried variations on the function, but without success.
> Can anyone help?

This probably means that you're calling it like:
 select updateCurrentData();
and you'll need to instead call it with the function in the FROM clause,
something like:
 select * from updateCurrentData();

pgsql-general by date:

Previous
From: Ron St-Pierre
Date:
Subject: Function Returning SETOF Problem
Next
From: Ron St-Pierre
Date:
Subject: Re: Function Returning SETOF Problem