X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2F1B232A23A for ; Fri, 1 Oct 2004 15:47:12 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20284-08 for ; Fri, 1 Oct 2004 14:47:04 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C8DAB32A248 for ; Fri, 1 Oct 2004 15:47:07 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i91El6NP009450; Fri, 1 Oct 2004 10:47:06 -0400 (EDT) To: "Johann Robette" Cc: pgsql-hackers@postgresql.org Subject: Re: Record unassigned yet In-reply-to: <005801c4a798$7ce9c820$a5010a0a@Johann> References: <005801c4a798$7ce9c820$a5010a0a@Johann> Comments: In-reply-to "Johann Robette" message dated "Fri, 01 Oct 2004 11:24:39 +0200" Date: Fri, 01 Oct 2004 10:47:05 -0400 Message-ID: <9449.1096642025@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/16 X-Sequence-Number: 59519 "Johann Robette" 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