Re: Inconsistency in plpgsql's error context reports

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Inconsistency in plpgsql's error context reports
Дата
Msg-id CA+TgmoYkeOcbg415LURWXmM-GdpRzvkM_sOjmL-C1-Cxz9RjWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Inconsistency in plpgsql's error context reports  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Inconsistency in plpgsql's error context reports  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Dec 10, 2017 at 11:55 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> There seem to be two ways we could look at this.  One is that the
> new test case just needs to be rejiggered to avoid unstable output
> ("\set VERBOSITY terse" would be the easiest way).  But there is
> also room to argue that it's bad that plpgsql produces error reports
> that vary depending on the phase of the moon, which is pretty much
> what this would look like in the field --- cache flushes will occur
> unpredictably in most application environments.

I am inclined toward the latter view.  I think predictability is very
important and that lack of predictability is both frustrating for
users and a sign of poor programming practices under the hood.  Nobody
likes clicking on the same thing twice and getting a different result
each time; as humans, we want to feel like we understand how things
work, and if they work differently at different times, we tend to
either question whether we understand them or question whether they
are actually robust systems.  For example, lately my car has started
to take a variable number of gallons of gasoline to fill the tank from
almost-empty to completely full.  I find that rather unnerving: how do
I know whether I'm going to run out of gas?  Similarly here -- I'm not
sure whether people want that extra CONTEXT line or not, but I think
they're going to want to either get it or not get it consistently.  If
not, they'll tend to feel like something is flaky.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: Rethinking MemoryContext creation
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] Custom compression methods