On Wed, 2005-12-14 at 17:05 -0200, Luiz K. Matsumura wrote:
> Hi, I have a similar case
> but instead of the statement
> PERFORM * FROM temp_table; -- without this line no problems
> I have a SELECT INTO inside the plpgsql function
> SELECT * INTO rec FROM temp_table;
> That return the same error as Tjibbe got.
> I try to use something like
> EXEC 'SELECT * INTO rec FROM temp_table';
> But I now postgres (8.1.1) returns a error
>
> EXEC of SELECT ... INTO is not implemented yet.
You have the syntax wrong. It is:
EXECUTE command-string [ INTO target ];
In your case, that is:
EXECUTE 'SELECT * FROM temp_table' INTO rec;
so that the INTO phrase is outside the string.
--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html