• Tom Lane's avatar
    Rethink plpgsql's way of handling SPI execution during an exception block. · 7efa8411
    Tom Lane authored
    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.
    7efa8411
plpgsql.sql 52 KB