Re: Call stacks and RAISE INFO

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, 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 16:45:45
Message-ID: CAFj8pRALU0VkxWyj2jaAeKjy6zjUVW_z9217mkcaFcSBhVM1fQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/10/15 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2011/10/15 Robert Haas <robertmhaas(at)gmail(dot)com>:
>>> On Sat, Oct 15, 2011 at 12:24 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>>> 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.
>
>>> error_context?
>
>> what about show_context, hide_context, hold_context, use_context ??
>
> I still think it should be CONTEXT, period.  All the other options to
> RAISE are named directly after the message lines they control; why
> should this one be different?

I had a idea to set CONTEXT from RAISE statement - for forwarding data
from handled exception

some like

BEGIN
...
EXCEPTION WHEN ...
GET DIAGNOSTICS _context = PG_EXCEPTION_CONTEXT;
REISE USING context = _context;
END;

Regards

Pavel Stehule

>
>                        regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-15 18:58:45 Pushing ScalarArrayOpExpr support into the btree index AM
Previous Message Bruce Momjian 2011-10-15 16:02:54 Re: .psqlrc version dependence (was Re: about EDITOR_LINENUMBER_SWITCH)