> On Oct 18, 2022, at 14:15, Bryn Llewellyn <bryn@xxxxxxxxxxxx> wrote: > Could the limitation be lifted by making tractable internal implementation changes? Or is it rooted in profoundly deep features of the architecture—meaning that it could never be lifted? That is a very good question. One of the issues (as I understand it) is to be able to continue to use the same connection in the event of an error. Here's the scenario: 1. SELECT * FROM my_func(); 2. my_func gets an error. The connection is now in an error state. 3. So, catching the exception doesn't do you much good, because future operations will get an error. This problem is solved by wrapping it in a savepoint, since rolling back to the savepoint will undo the error state of the connection. There might be a way forward, but it's hard to get the proper semantics of an exception handler without doing something like that.