Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 500794778E8 for ; Thu, 7 Nov 2002 10:20:47 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id B6AC3476F47 for ; Thu, 7 Nov 2002 09:35:31 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Thu Nov 07 15:35:27 2002 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA06304 for ; Thu, 7 Nov 2002 15:35:27 +0100 (MET) Message-ID: <3DCA7A2E.6DD4CABE@rodos.fzk.de> Date: Thu, 07 Nov 2002 15:35:27 +0100 From: Christoph Haller X-Mailer: Mozilla 4.06 [en] (X11; I; HP-UX B.10.20 9000/780) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: PLpgSQL FOR IN EXECUTE question Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/106 X-Sequence-Number: 10248 Consider the following PLpgSQL code fragment FOR this_record IN EXECUTE ''SELECT '' || quote_ident($1) || ''FROM '' || quote_ident($2) LOOP list := list || '', '' || this_record.$1 ; END LOOP; As expected, accessing a field via this_record.$1 does not work. Can it be done otherwise? Regards, Christoph