On Wed, Jun 30, 2010 at 2:41 PM, Andrea Lombardoni <andrea@xxxxxxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general