Currently, to achieve this, I think it would be necessary to create a custom, child MemoryContext in fn_mcxt; when that gets deleted or reset, throw the "Postgres.CallFinished" exception and clear the call references.
Primary question, is it safe to call the handler inside a MemoryContext delete/reset?
Currently, to achieve this, I think it would be necessary to create a custom, child MemoryContext in fn_mcxt; when that gets deleted or reset, throw the "Postgres.CallFinished" exception and clear the call references.
Primary question, is it safe to call the handler inside a MemoryContext delete/reset?