pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-sql@postgresql.org
Subject: PLpgSQL FOR IN EXECUTE question
Date: Thu, 07 Nov 2002 15:35:27 +0100
Message-ID: <3DCA7A2E.6DD4CABE@rodos.fzk.de> (raw)

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




view thread (5+ messages)  latest in thread

Message-ID: <3DCA7A2E.6DD4CABE@rodos.fzk.de>
Permalink:  ../3DCA7A2E.6DD4CABE@rodos.fzk.de/
Also on:    postgresql.org/message-id/3DCA7A2E.6DD4CABE@rodos.fzk.de

 · 

reply

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: ch@rodos.fzk.de
  Subject: Re: PLpgSQL FOR IN EXECUTE question
  In-Reply-To: <3DCA7A2E.6DD4CABE@rodos.fzk.de>

* 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