Sergei Kornilov <sk(at)zsrv(dot)org> writes:
>> That's not OK.
> hmm. Did you mean catching only needed errors by errcode? Something like attached?
No, he means you can't EVER catch an error and not re-throw it, unless
you do a full (sub)transaction abort and cleanup instead of re-throwing.
We've been around on this repeatedly because people want to believe they
can take shortcuts. (See e.g. discussions for the jsonpath stuff.)
It doesn't reliably work to do so, and we have a project policy against
trying, and this code should never have been committed in this state.
regards, tom lane