We make heavy use of `GET STACKED DIAGNOSTICS` to determine where errors happened. However, I am trying to use RAISE EXCEPTION to report errors, and have discovered that RAISE is specifically prevented from adding to the error context:
That context would be awfully useful for us, even for manually generated exceptions. Can anyone shed some light on A) why this is, and B) if it's still desired, and C) if so, are there any workarounds? Is there an exception I can trick Postgres into throwing that will include my user-generated string?