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 CA56F32A237 for ; Fri, 1 Oct 2004 12:28:01 +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 53527-02 for ; Fri, 1 Oct 2004 11:27:54 +0000 (GMT) Received: from dns.cegetel-passerelle.com (dns.cegetel-passerelle.com [213.223.187.134]) by svr1.postgresql.org (Postfix) with ESMTP id 68F9032A234 for ; Fri, 1 Oct 2004 12:27:56 +0100 (BST) Received: from escmail.esc-lille.fr (unknown [213.223.237.160]) by dns.cegetel-passerelle.com (Postfix) with ESMTP id E068F24597 for ; Fri, 1 Oct 2004 13:27:55 +0200 (CEST) Received: from srvmail.esc-lille.fr (srvmail.esc-lille.fr [10.1.10.5]) by escmail.esc-lille.fr (Postfix) with ESMTP id D7B1067C0DD for ; Fri, 1 Oct 2004 13:26:56 +0200 (CEST) Received: from Johann ([10.10.1.165]) by srvmail.esc-lille.fr with Microsoft SMTPSVC(5.0.2195.6713); Fri, 1 Oct 2004 13:27:47 +0200 From: "Johann Robette" To: "'Russell Smith'" , Subject: RE : Record unassigned yet Date: Fri, 1 Oct 2004 13:28:33 +0200 Message-ID: <005f01c4a7a9$c8b80030$a5010a0a@Johann> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <200410012119.51996.mr-russ@pws.com.au> X-OriginalArrivalTime: 01 Oct 2004 11:27:47.0737 (UTC) FILETIME=[AD9E7090:01C4A7A9] 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/13 X-Sequence-Number: 59516 Oh sorry about that! No, I was alright in the syntax. Both are defined as current. I can't find where the problem lies... -----Message d'origine----- De=A0: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-owner@postgresql.org] De la part de Russell Smith Envoy=E9=A0: vendredi 1 octobre 2004 13:20 =C0=A0: pgsql-hackers@postgresql.org Objet=A0: Re: [HACKERS] Record unassigned yet On Fri, 1 Oct 2004 07:24 pm, Johann Robette wrote: > Hello, >=20 > I'm experiencing a strange problem. Here it is : > I've created a function with a FOR loop. >=20 > DECLARE > Current RECORD; > BEGIN > FOR current IN SELECT * FROM employees LOOP > Tmp :=3D current.id; > END LOOP; > ... current !=3D Current ? >=20 > When I call the function, I get the error : > ERROR: record " current " is unassigned yet >=20 > Any idea? >=20 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? >=20 > http://www.postgresql.org/docs/faqs/FAQ.html >=20 >=20 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match