"Jaiswal Dhaval Sudhirkumar" <JaiswalDS@microland.com> writes:
> ERROR: SPI_execute_plan_with_paramlist failed executing query "SAVEPOINT my_savepoint": SPI_ERROR_TRANSACTION
This is not a bug. It's an extremely well-documented limitation that
you can't use those commands in a plpgsql function.
You can get the effect of a savepoint using a BEGIN/EXCEPTION block.
regards, tom lane