Re: Function Returning SETOF Problem

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Function Returning SETOF Problem
Дата
Msg-id 20031217173430.H75165@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: Function Returning SETOF Problem  (Ron St-Pierre <rstpierre@syscor.com>)
Ответы Re: Function Returning SETOF Problem
Список pgsql-general
On Wed, 17 Dec 2003, Ron St-Pierre wrote:

> 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@postgresql.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?

That sounds like a mismatch between the record in rec and your declared
output type, but I couldn't say for sure without a complete example
including the table declarations really.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function Returning SETOF Problem
Следующее
От: "Alice Bag"
Дата:
Сообщение: Re: Firebird and PostgreSQL at the DB Corral.