Markus Wanner <mar...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers