Re: Function Returning SETOF Problem

From: Ron St-Pierre <rstpierre(at)syscor(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Function Returning SETOF Problem
Date: 2003-12-18 00:42:18
Message-ID: 3FE0F7EA.8040406@syscor.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephan Szabo wrote:

>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();
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
>
>
aha, that's part of it. I now get this error:
ERROR: wrong record type supplied in RETURN NEXT
Any ideas on this one?

TIA
Ron

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-18 00:48:24 Re: restore error - language "plperlu" is not trusted
Previous Message Stephan Szabo 2003-12-18 00:26:20 Re: Function Returning SETOF Problem