From: Furesz Peter <spam@srv.hu>
To: pgsql <pgsql-sql@postgresql.org>
Subject: Looping recordset
Date: Thu, 25 Jan 2007 20:45:17 +0100
Message-ID: <002901c740b9$56fff190$6500a8c0@bixerverintel> (raw)
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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: spam@srv.hu
Subject: Re: Looping recordset
In-Reply-To: <002901c740b9$56fff190$6500a8c0@bixerverintel>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox