> > Now test demonstrate how errors uncaught on the Tcl level interact > > with postgresql error system. > > > > you can catch the exception outside and write own message
OK, here is patch with tests which don't depend on function OIDs
They ignore stack trace ($::errorinfo global variable) completely, and analyze just error message.