Thread: pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where
pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where
From
heikki@postgresql.org (Heikki Linnakangas)
Date:
Log Message: ----------- The previous fix in CVS HEAD and 8.4 for handling the case where a cursor being used in a PL/pgSQL FOR loop is closed was inadequate, as Tom Lane pointed out. The bug affects FOR statement variants too, because you can close an implicitly created cursor too by guessing the "<unnamed portal X>" name created for it. To fix that, "pin" the portal to prevent it from being dropped while it's being used in a PL/pgSQL FOR loop. Backpatch all the way to 7.4 which is the oldest supported version. Tags: ---- REL7_4_STABLE Modified Files: -------------- pgsql/src/backend/utils/mmgr: portalmem.c (r1.62 -> r1.62.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.62&r2=1.62.2.1) pgsql/src/include/utils: portal.h (r1.47 -> r1.47.4.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/portal.h?r1=1.47&r2=1.47.4.1) pgsql/src/pl/plpgsql/src: pl_exec.c (r1.93.2.3 -> r1.93.2.4) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.93.2.3&r2=1.93.2.4)