> Some sort of modification will be needed to the error processing
> mechanism, but this is beyond me at this point ... I don't have any
> idea how could this be.
So.. If you cannot rollback a subtransaction within a plpgsql function
(all function types or just that one?) then there is no point is
allowing them to be created either.
I say disallow sub-transactions within plpgsql functions until it works
as expected.