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

From Tom Lane
Subject Re: [HACKERS] PL/pgsql EXECUTE 'SELECT INTO ...'
Date
Msg-id 12696.981661766@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] PL/pgsql EXECUTE 'SELECT INTO ...'  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane 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 always use CREATE TABLE AS.

Does SPI_exec() support that?  (Tries it ... seems to work ...)
Cool.  OK, we have the bases covered then; there's no need to allow
SELECT INTO inside EXECUTE until we can make it work as expected.
        regards, tom lane


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] PL/pgsql EXECUTE 'SELECT INTO ...'
Next
From: Jelle Ouwerkerk
Date:
Subject: fetching the id of a new row