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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shakti Singh <shakti(dot)0123(at)gmail(dot)com>
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:13:40
Message-ID: 19259.1485274420@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shakti Singh 2017-01-24 16:17:25 Re: How to get an exception detail in a function called in exception handler
Previous Message Shakti Singh 2017-01-24 16:09:43 How to get an exception detail in a function called in exception handler