Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 965019FB645 for ; Thu, 25 Jan 2007 15:45:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 20271-09 for ; Thu, 25 Jan 2007 15:45:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id E48E19FB5D8 for ; Thu, 25 Jan 2007 15:45:21 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from bixerver.hu (admin.bixerver.hu [195.70.38.67]) by svr4.postgresql.org (Postfix) with ESMTP id 2E4A75AF8F7 for ; Thu, 25 Jan 2007 19:45:17 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by bixerver.hu (Postfix) with ESMTP id AB8586800B48 for ; Thu, 25 Jan 2007 20:45:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bixerver.hu Received: from bixerver.hu ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1v973ngc6xn6 for ; Thu, 25 Jan 2007 20:45:12 +0100 (CET) Received: from bixerverintel (82-131-174-236.pool.invitel.hu [82.131.174.236]) by bixerver.hu (Postfix) with ESMTP id 6CC456800B45 for ; Thu, 25 Jan 2007 20:45:12 +0100 (CET) Message-ID: <002901c740b9$56fff190$6500a8c0@bixerverintel> From: "Furesz Peter" To: "pgsql" Subject: Looping recordset Date: Thu, 25 Jan 2007 20:45:17 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-2"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.928 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200701/122 X-Sequence-Number: 27274 Hello, How can I loop a PL/PgSQL recorset variable? The example: DECLARE v_tmp_regi RECORD; v_tmp RECORD; BEGIN SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE sf.termekfajta_id= a_termekfajta_id AND sf.marka_id=a_marka_id; DELETE FROM sulyozas_futamido; FOR v_tmp IN v_tmp_regi LOOP --I would like to work here with the old recordset! END LOOP; ^^^^^^^^^^^^^^ -- This is not working !!! END;