Search Postgresql Archives

Re: Use of ?get diagnostics'?

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

 



On 9/25/19 10:44 PM, Thiemo Kellner wrote:
Hello Adrian

Quoting Adrian Klaver <adrian.klaver@xxxxxxxxxxx>:

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.klaver@xxxxxxxxxxx





[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