From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Use of ?get diagnostics'? |
Date: | 2019-09-26 13:35:30 |
Message-ID: | af25493a-7fd3-2ee4-5416-347c8b822ef8@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 9/25/19 10:44 PM, Thiemo Kellner wrote:
> Hello Adrian
>
> Quoting Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>:
>
>> To get above I believe you will need to use GET CURRENT DIAGNOSTICS
>> PG_CONTEXT:
>
> I actually use "get stacked diagnostics" to retrieve the exception
> place. And it works. I am not sure why I did no see it.
GET [ CURRENT ] DIAGNOSTICS:
https://www.postgresql.org/docs/11/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS
and
GET STACKED DIAGNOSTICS
https://www.postgresql.org/docs/11/plpgsql-control-structures.html#PLPGSQL-EXCEPTION-DIAGNOSTICS
are two different things.
See the example here:
https://www.postgresql.org/docs/11/plpgsql-control-structures.html#PLPGSQL-CALL-STACK
>
> However, I noticed, that the stack does not include the error place in
> dynamic SQL executed by the "execute" command. Maybe I am missing
> something again.
>
> Kind regards
>
> Thiemo
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Krishnakant Mane | 2019-09-26 13:44:16 | Re: managing primary key conflicts while restoring data to table with existing data |
Previous Message | Rob Sargent | 2019-09-26 13:23:19 | Re: managing primary key conflicts while restoring data to table with existing data |