Re: Patch: show relation and tuple infos of a lock to acquire

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch: show relation and tuple infos of a lock to acquire
Дата
Msg-id 13168.1395160721@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch: show relation and tuple infos of a lock to acquire  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Patch: show relation and tuple infos of a lock to acquire  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Well, if we're back to one version of the message, and I'm glad we
> are, can we go back to saying:

> CONTEXT:  while updating tuple (0,2) in relation "public"."foo" of
> database "postgres"

If I end up being the one who commits this, it's going to say

while updating tuple (0,2) in table "foo"

Not more, and not less.  It is not project style to include schema names
(much less database names) in error messages where they're not central to
the meaning.

One reason why not is that schema and database names are generally not
available without an extra lookup step, which you don't really want to do
in an error-reporting code path.  Every extra action you take increases
the risk of a cascading failure, so that the user will get something
unhelpful like "out of memory" rather than the oh-so-extra-helpful message
you wanted to print.  The added utility of the extra information, for most
cases, is insufficient to justify that risk.

Even without that argument, it's still not project style; why should this
message be randomly different from many hundreds of others?  If you want
to start a push to include schema names anywhere a table name is given,
that should be debated separately and then done in a reasonably uniform
fashion.
        regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Patch: show relation and tuple infos of a lock to acquire
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Patch: show relation and tuple infos of a lock to acquire