Search Postgresql Archives

Re: How to get an exception detail in a function called in exception handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <tgl@xxxxxxxxxxxxx> wrote:
Shakti Singh <shakti.0123@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux