42.6.8.1. Obtaining Information About An Error

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: philippe(dot)godfrin(at)nov(dot)com
Subject: 42.6.8.1. Obtaining Information About An Error
Date: 2020-10-07 17:50:19
Message-ID: 160209301903.21448.2454407587993311933@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/plpgsql-control-structures.html
Description:

42.6.8.1. Obtaining Information About An Error

This example omits raise notice code:

DECLARE
text_var1 text;
text_var2 text;
text_var3 text;
BEGIN
-- some processing which might cause an exception
...
EXCEPTION WHEN OTHERS THEN
GET STACKED DIAGNOSTICS text_var1 = MESSAGE_TEXT,
text_var2 = PG_EXCEPTION_DETAIL,
text_var3 = PG_EXCEPTION_HINT;
END;

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2020-10-07 20:54:34 Re: 42.6.8.1. Obtaining Information About An Error
Previous Message Stephen Frost 2020-10-07 14:12:06 Re: Possible mistake in backup documentation