From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Oscar Chavarria" <cyberbuzzard(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Function problem |
Date: | 2007-04-09 15:04:37 |
Message-ID: | 28076.1176131077@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
"Oscar Chavarria" <cyberbuzzard(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | kvnsmnsn | 2007-04-10 19:35:55 | trying to connect to PostgreSQL |
Previous Message | Stephan Szabo | 2007-04-09 14:32:13 | Re: Function problem |