Re: Inconsistency in plpgsql's error context reports

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistency in plpgsql's error context reports
Дата
Msg-id 7449.1513194640@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inconsistency in plpgsql's error context reports  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Dec 11, 2017 at 3:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Here's a quick hack at that.  I guess the main question that needs to be
>> asked is whether we're happy with plpgsql getting so much chattier
>> (as per all the regression test changes).

> I confess to never having really grokked, even in the pre-patch state,
> why we sometimes get an "SQL statement" context line and sometimes
> not.  However, what strikes me about this is that the SQL statement is
> a completely fabricated one that the user never entered.

I spent a brief amount of time looking at whether we could hide the
"fabricated statements" more thoroughly, and decided that it would
be a lot more work than seems warranted, and there would likely be
holes in it anyway.  It's not like we don't document this behavior:
the plpgsql introductory material says

    All expressions used in PL/pgSQL statements are processed using
    the server's main SQL executor. For example, when you write a
    PL/pgSQL statement like

        IF expression THEN ...

    PL/pgSQL will evaluate the expression by feeding a query like

        SELECT expression

    to the main SQL engine.

https://www.postgresql.org/docs/devel/static/plpgsql-expressions.html

So basically my conclusion at this point is that I'm not willing
to do any more work on this than the patch I already proposed.
If you want to do something more invasive, have at it.

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] A design for amcheck heapam verification
Следующее
От: Robert Haas
Дата:
Сообщение: Re: explain analyze output with parallel workers - question aboutmeaning of information for explain.depesz.com