Re: Re: PL/pgsql EXECUTE 'SELECT INTO ...' - Mailing list pgsql-sql

From Tom Lane
Subject Re: Re: PL/pgsql EXECUTE 'SELECT INTO ...'
Date
Msg-id 11899.981644635@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/pgsql EXECUTE 'SELECT INTO ...'  (Jan Wieck <janwieck@Yahoo.com>)
List pgsql-sql
Jan Wieck <janwieck@Yahoo.com> writes:
>> I am inclined to keep our options open by forbidding EXECUTE 'SELECT
>> INTO ...' for now.  That's more than a tad annoying, because that leaves
>> no useful way to do a dynamically-built SELECT, but if we don't forbid
>> it I think we'll regret it later.

>     You can do something like
>         FOR record_var IN EXECUTE <string-expr> LOOP
>             ...
>         END LOOP;

Okay, that solves the concern I had about not being able to get the
result of an EXECUTEd select at all.  I'll go ahead and forbid
EXECUTE 'SELECT INTO' for the time being, and we can talk about
improving plpgsql later.
        regards, tom lane


pgsql-sql by date:

Previous
From: "omid omoomi"
Date:
Subject: Re: Aggregates and joined tables...
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: PL/PGSQL function with parameters