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:
So that means that this doesn't work: I've posted more details here: http://dba.stackexchange.com/questions/96743/postgres-how-to-get-stack-trace-for-a-manually-raised-exception 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? Many thanks for any help you can offer. -- View this message in context: http://postgresql.nabble.com/Why-doesn-t-RAISE-EXCEPTION-provide-error-context-tp5844382.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general