Thanks for the reply Tom!

The log_error_function is being called by thousands of functions and that
is why I thought it would be great if there was a way without making
changes to it and subsequently writing code to pass the parameters in all
these exception block.

Would have been awesome if error logging function could get the previous
exception details somehow.

Thanks,


Shakti Singh


On Tue, Jan 24, 2017 at 11:13 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Shakti Singh <shakti.0...@gmail.com> writes:
> > In oracle sqlcode and sqlerrm can be accessed in a function called from
> an
> > exception block.
> > How do I do this in PostgreSQL
>
> In PG those are local variables within an exception block.  You'd have to
> pass their values to the error-logging function explicitly.
>
>                         regards, tom lane
>

Reply via email to