On Wed, Jun 30, 2010 at 2:41 PM, Andrea Lombardoni <andrea@lombardoni.ch> wrote:
>> You need to use EXECUTE for the INSERT statement as well per error:
>>
>> CONTEXT: SQL statement "INSERT INTO idmap (oldid, type, newid) VALUES(1,
>> 1, 1)" PL/pgSQL function "test" line 16 at SQL statement
>
> Thanks, this works and solves my problem.
>
> Still, I find this behaviour to be rather quirky.
>
it is fixed on 8.3. So you are out of luck with 8.2 on this one I'm
afraid, gotta go with eXECUTe
--
GJ