Re: Record unassigned yet - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Record unassigned yet
Date
Msg-id 9449.1096642025@sss.pgh.pa.us
Whole thread Raw
In response to Record unassigned yet  ("Johann Robette" <jrobette@onyme.com>)
Responses RE : Record unassigned yet
List pgsql-hackers
"Johann Robette" <jrobette@onyme.com> writes:
> I've created a function with a FOR loop.

> DECLARE
> Current RECORD;
> BEGIN
> FOR current IN SELECT * FROM employees LOOP
>         Tmp := current.id;
> END LOOP;
> ...

> When I call the function, I get the error :
>     ERROR:  record " current " is unassigned yet

> Any idea?

What you showed us looks fine, therefore the problem is in something you
didn't show us.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: CREATE INDEX speeds up query on 31 row table ...
Next
From: "Johann Robette"
Date:
Subject: RE : Record unassigned yet