Re: How do I get query result(select e.g.) from a dynamic command(EXECUTE)?

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Wei Wang" <ww220(at)cam(dot)ac(dot)uk>, "pgsql" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I get query result(select e.g.) from a dynamic command(EXECUTE)?
Date: 2004-02-19 13:04:31
Message-ID: 200402191304.31213.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 19 February 2004 11:50, Wei Wang wrote:
> Hi,
>
> I want to do a select in dynamic command, something like:
>
[snip]
> I know that SELECT INTO doesn't support dynamic command, EXECUTE does. But
> if I EXECUTE a select query, how do I get
> the select result from it?

FOR record | row IN EXECUTE text_expression LOOP
statements
END LOOP;

It's in the manuals, but that's about all they say on the subject
--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2004-02-19 13:24:41 Re: Big Tables vs. many Tables vs. many Databases
Previous Message Wei Wang 2004-02-19 12:16:44 Re: How do I get query result(select e.g.) from a dynamic command(EXECUTE)?