Re: Call stacks and RAISE INFO

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Call stacks and RAISE INFO
Date: 2011-10-15 04:24:10
Message-ID: CAFj8pRA9=GEfUXPsq2P8iLKSzaGk=Tq25AdNUBGkTD13y2sOWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

2011/10/15 Josh Berkus <josh(at)agliodbs(dot)com>:
>
>> Now that we have syntax for adding miscellaneous options to RAISE
>> statements, what I suggest we consider is a RAISE option that suppresses
>> all context lines for the message, perhaps
>>
>> RAISE NOTICE 'fee, fi, fo, fum' USING context = false;
>
> Yeah, that would do it.  Pavel?  ;-)
>

I have no problem with this. A context can be false for info and true
for other in default. Please, use a different identifier than
"context", that can be use for reading context in future - maybe
"attach_context" or some similar.

Just note, when we are in this topis. I got a experience so debugging
functions that contains a pattern

BEGIN
.. do some .. that can raise exception ...
EXCEPT WHEN OTHERS ..
.. do some else
RAISE ... ;
END IF

is little bit difficult, because we lost a context information about
original exception

Regards

Pavel

> --
> Josh Berkus
> PostgreSQL Experts Inc.
> http://pgexperts.com
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-15 05:41:00 Re: [REVIEW] Patch for cursor calling with named parameters
Previous Message Hitoshi Harada 2011-10-15 04:04:44 Re: Underspecified window queries in regression tests