From: | "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br> |
---|---|
To: | olly(at)lfix(dot)co(dot)uk |
Cc: | PostGreSQL <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: TEMPORARY TABLE in a PL/pgSQL function |
Date: | 2005-12-15 11:01:12 |
Message-ID: | 43A14CF8.3040901@planit.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Oh my god,
It's so simple and I'm spend a lot of time in this problem.
And the bad news for me is that this was all the time in the Postgres
Document.
Thank very much Oliver. :-)
Altought this, I want to sugest to add a session in Pl/pgSQL
documentation, a "command reference"
like the SQL commands reference with brief description of the sintax and
a link to the
proper location in atual document section for a detailed behavior.
I say this, because I think sometimes are hard to find the desired
information in the doc.
Thanks a lot.
Oliver Elphick wrote:
>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.
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | me | 2005-12-15 11:10:58 | Re: GUID function in pgsql? |
Previous Message | A. Kretschmer | 2005-12-15 08:51:53 | Re: client-server connection |