-
- Downloads
Rethink plpgsql's way of handling SPI execution during an exception block.
We don't really want to start a new SPI connection, just keep using the old one; otherwise we have memory management problems as illustrated by John Kennedy's bug report of today. This requires a bit of a hack to ensure the SPI stack state is properly restored, but then again what we were doing before was a hack too, strictly speaking. Add a regression test to cover this case.
Showing
- src/backend/executor/spi.c 9 additions, 1 deletionsrc/backend/executor/spi.c
- src/include/executor/spi.h 2 additions, 1 deletionsrc/include/executor/spi.h
- src/pl/plpgsql/src/pl_exec.c 13 additions, 18 deletionssrc/pl/plpgsql/src/pl_exec.c
- src/test/regress/expected/plpgsql.out 30 additions, 0 deletionssrc/test/regress/expected/plpgsql.out
- src/test/regress/sql/plpgsql.sql 18 additions, 0 deletionssrc/test/regress/sql/plpgsql.sql
Loading
Please register or sign in to comment