Re: New patch for Column-level privileges

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: New patch for Column-level privileges
Дата
Msg-id 25643.1231091372@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: New patch for Column-level privileges  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
Markus Wanner <markus@bluegap.ch> writes:
> Stephen Frost wrote:
>>> BTW: how are long constant strings expected to be formatted? Are those
>>> allowed to exceed 80 columns, or are they expected to be split like so
>> 
>> Honestly, I think I've seen both done.

> Yeah, that's why I'm asking.

IMHO, the trouble with breaking up error strings like that is that it
can defeat attempts to grep the source for a particular error message.
(If you search for "foo bar baz", you won't find it if someone chose
to break the string between those words.)  This isn't too harmful if
you get no hits, because you can try again with a substring --- but it
really sucks if some instances of the string are broken up differently
than others, because you might see only the wrong instances and come
to a mistaken conclusion about the possible sources of an error reported
from the field.  So I tend not to like breaking up long strings at all,
and definitely look with disfavor on breaking them in random spots
rather than natural break points of the sentence.

Because of that, I tend not to worry about holding to the 80-column
window width when it comes to error message strings.  Other than that
case, though, you should try to stay to less than 80 columns.  If you
don't, pgindent will do it for you, and the end result will probably
be uglier than if you'd made the code fit manually.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: parallel restore
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_stats queries versus per-database encodings