Re: PL/pgSQL, RAISE and error context
От
Pavel Stehule
Тема
Re: PL/pgSQL, RAISE and error context
Дата
Msg-id
CAFj8pRCmax-Hc0kyLC3rUJMN0LBND3iMBu=1jiOyF7J=J0+QeA@mail.gmail.com
Ответ на
Re: PL/pgSQL, RAISE and error context (Tom Lane)
Список
Дерево обсуждения
PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Peter Eisentraut <peter_e@gmx.net>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Peter Eisentraut <peter_e@gmx.net>
Re: PL/pgSQL, RAISE and error context Jeevan Chalke <jeevan.chalke@enterprisedb.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL, RAISE and error context Heikki Linnakangas <hlinnaka@iki.fi>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Heikki Linnakangas <hlinnaka@iki.fi>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Heikki Linnakangas <hlinnaka@iki.fi>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Heikki Linnakangas <hlinnaka@iki.fi>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL, RAISE and error context Tom Lane <tgl@sss.pgh.pa.us>
Counting lines correctly in psql help displays Tom Lane <tgl@sss.pgh.pa.us>
Re: Counting lines correctly in psql help displays Andrew Dunstan <andrew@dunslane.net>
Re: Counting lines correctly in psql help displays Tom Lane <tgl@sss.pgh.pa.us>
Re: Counting lines correctly in psql help displays Andrew Dunstan <andrew@dunslane.net>
Re: Counting lines correctly in psql help displays Greg Stark <stark@mit.edu>
Re: Counting lines correctly in psql help displays Tom Lane <tgl@sss.pgh.pa.us>
Re: Counting lines correctly in psql help displays Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Counting lines correctly in psql help displays Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL, RAISE and error context Joe Conway <mail@joeconway.com>
Re: PL/pgSQL, RAISE and error context Joe Conway <mail@joeconway.com>
Re: PL/pgSQL, RAISE and error context Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Robert Haas <robertmhaas@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Robert Haas <robertmhaas@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Joel Jacobson <joel@trustly.com>
Re: PL/pgSQL, RAISE and error context Robert Haas <robertmhaas@gmail.com>
Re: PL/pgSQL, RAISE and error context Joel Jacobson <joel@trustly.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Joel Jacobson <joel@trustly.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Joel Jacobson <joel@trustly.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Joel Jacobson <joel@trustly.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Joel Jacobson <joel@trustly.com>
Re: PL/pgSQL, RAISE and error context Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Merlin Moncure <mmoncure@gmail.com>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
Re: PL/pgSQL, RAISE and error context Marko Tiikkaja <marko@joh.to>
Re: PL/pgSQL, RAISE and error context Pavel Stehule <pavel.stehule@gmail.com>
2015-01-26 16:14 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2015-01-26 14:02 GMT+01:00 Marko Tiikkaja <marko@joh.to>:
> I am thinking, so solution
> /* if we are doing RAISE, don't report its location */
> if (estate->err_text == raise_skip_msg)
> return;
> is too simple, and this part should be fixed. This change can be done by on
> plpgsql or libpq side. This is bug, and it should be fixed.
Doing this in libpq is utterly insane. It has not got sufficient context
to do anything intelligent. The fact that it's not intelligent is exposed
by the regression test changes that the proposed patch causes, most of
which do not look like improvements.
I don't understand. There can be a overhead due useless transformation some data to client side. But all what it need - errcontext and errlevel is possible.
Another problem is that past requests to change this behavior have
generally been to the effect that people wanted *more* context suppressed
not less, ie they didn't want any CONTEXT lines at all on certain
messages. So the proposed patch seems to me to be going in exactly the
wrong direction.
The design I thought had been agreed on was to add some new option to
plpgsql's RAISE command which would cause suppression of all CONTEXT lines
not just the most closely nested one. You could argue about whether the
behavior needs to be 100% backwards compatible or not --- if so, perhaps
it could be a three-way option all, none, or one line, defaulting to the
last for backwards compatibility.
I see a problem what should be default behave. When I raise NOTICE, then I don't need (don't would) to see CONTEXT lines, When I raise EXCEPTION, then I usually would to see CONTEXT lines.
Cannot be solution?
estate->err_text = stmt->elog_level == ERROR ? estate->err_text : raise_skip_msg ;
estate->err_text = stmt->elog_level == ERROR ? estate->err_text : raise_skip_msg ;
Regards
Pavel
regards, tom lane
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата: