From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br> |
Cc: | PostGreSQL <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: TEMPORARY TABLE in a PL/pgSQL function |
Date: | 2005-12-14 19:18:38 |
Message-ID: | 1134587919.4974.17.camel@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
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(at)lfix(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | s anwar | 2005-12-14 19:27:20 | Repercussions of killing a vacuum |
Previous Message | Charlie Bright | 2005-12-14 19:10:43 | Help please |