From: | Shakti Singh <shakti(dot)0123(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to get an exception detail in a function called in exception handler |
Date: | 2017-01-24 16:17:25 |
Message-ID: | CAH19PkkhipBTYQDzANXXi3qxj5ucov--5d0uWuAAumTPsHAmCg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Shakti Singh <shakti(dot)0123(at)gmail(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua Chamberlain | 2017-01-24 17:55:40 | Re: Why is materialized view creation a "security-restricted operation"? |
Previous Message | Tom Lane | 2017-01-24 16:13:40 | Re: How to get an exception detail in a function called in exception handler |