Received: from tarzan.ugyvitelszolgaltato.hu (unknown [213.163.26.102]) by postgresql.org (Postfix) with ESMTP id F0BCF47676E for ; Fri, 8 Mar 2002 12:56:26 -0500 (EST) Received: from DAQ ([193.80.82.4]) by tarzan.ugyvitelszolgaltato.hu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id TAA20233 for ; Fri, 8 Mar 2002 19:12:26 +0100 X-Authentication-Warning: tarzan.ugyvitelszolgaltato.hu: Host [193.80.82.4] claimed to be DAQ Date: Fri, 8 Mar 2002 18:53:15 +0100 From: daq X-Mailer: The Bat! (v1.51) UNREG / CD5BF9353B3B7091 Reply-To: daq X-Priority: 3 (Normal) Message-ID: <1746949476.20020308185315@ugyvitelszolgaltato.hu> To: pgsql-sql@postgresql.org Subject: Re: problem with RECORD in a stored procedure In-Reply-To: <200203081502.PAA28287@cs.may.ie> References: <200203081502.PAA28287@cs.may.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200203/101 X-Sequence-Number: 6982 B is record type and you can't insert a record into a field. You must rewrite your code like this: FOR b IN SELECT MIN(total) as mintotal from results LOOP INSERT INTO orla(total) VALUES(b.mintotal); END LOOP; DAQ