Re: Function problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function problem
Дата
Msg-id 28076.1176131077@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Function problem  ("Oscar Chavarria" <cyberbuzzard@gmail.com>)
Список pgsql-novice
"Oscar Chavarria" <cyberbuzzard@gmail.com> writes:
> DECLARE
> yield_rows investments%rowtype;
> ...
> FOR yield_rows IN SELECT * FROM investments
> LOOP
> sum_returns:=
>
investments.return1+investments.return2+investments.return3+investments.return4+investments.return5+investments.return6+investments.return7;

I think you want "yield_rows" not "investments" here, no?

> *ERROR: missing FROM-clause entry for table "investments"*

Also, you should have gotten a more specific error message than that.
Wasn't there a "context" line telling you exactly which line of the
function contained the problem?

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Function problem
Следующее
От: marcofuics@netscape.net
Дата:
Сообщение: prepared statements logging