From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Marko Tiikkaja <marko(at)joh(dot)to>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PL/pgSQL, RAISE and error context |
Date: | 2013-08-21 15:34:59 |
Message-ID: | CAFj8pRAU38Rhp8T9DEBekeEc8M=ZB1ay1fC7uC9M_3gxGfw32g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/8/21 Merlin Moncure <mmoncure(at)gmail(dot)com>
> On Wed, Aug 21, 2013 at 10:07 AM, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
> > On 8/21/13 5:05 PM, Merlin Moncure wrote:
> >>
> >> On Wed, Aug 21, 2013 at 9:22 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>>
> >>> Marko Tiikkaja <marko(at)joh(dot)to> writes:
> >>>>
> >>>> By default, PL/pgSQL does not print the error context of a RAISE
> >>>> statement, for example:
> >>>
> >>>
> >>> It used to do so, in the beginning when we first added
> context-printing.
> >>> There were complaints that the result was too verbose; for instance if
> >>> you
> >>> had a RAISE NOTICE inside a loop for progress-monitoring purposes,
> you'd
> >>> get two lines for every one you wanted. I think if we undid this we'd
> >>> get the same complaints again. I agree that in complicated nests of
> >>> functions the location info is more interesting than it is in trivial
> >>> cases, but that doesn't mean you're not going to hear such complaints
> >>> from
> >>> people with trivial functions.
> >>
> >>
> >> It *is* (apologies for the hijack) too verbose but whatever context
> >> suppressing we added doesn't work in pretty much any interesting case.
> >> What is basically needed is for the console to honor
> >> log_error_verbosity (which I would prefer) or a separate GUC in manage
> >> the console logging verbosity:
> >
> >
> > Why does \set VERBOSITY 'terse' not work for you?
>
> Because it can't be controlled mid-function...that would suppress all
> context of errors as well as messages and so it's useless. Also psql
> directives for this purpose is a hack anyways -- what if I'm using a
> non-psql client?
>
> what I really want is:
> SET LOCAL log_console_verbosity = 'x'
>
>
it is not bad idea
Pavel
> merlin
>
>
> --
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Tiikkaja | 2013-08-21 15:47:02 | Re: PL/pgSQL, RAISE and error context |
Previous Message | David E. Wheeler | 2013-08-21 15:30:09 | Re: CAST Within EXCLUSION constraint |