Re: [HACKERS] Patch to implement pg_current_logfile() function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Patch to implement pg_current_logfile() function
Date
Msg-id 17143.1487195248@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Patch to implement pg_current_logfile() function  ("Karl O. Pinc" <kop@meme.com>)
List pgsql-hackers
"Karl O. Pinc" <kop@meme.com> writes:
> On Wed, 15 Feb 2017 15:23:00 -0500
> Robert Haas <robertmhaas@gmail.com> wrote:
>> I think our preferred style is not to break strings across lines like
>> this.

> How do you do that and not exceed the 80 character line limit?
> Just ignore the line length limit?

Right.  It depends on context, but letting isolated lines wrap doesn't
do that much damage to readability, IMO anyway.  (If you've got a bunch
of these adjacent to each other, you might choose to break them to
reduce confusion.)

The advantage of not breaking up error strings is that it makes grepping
for them more reliable, when you're wondering "where in the sources did
this error come from?".  If you get a report about "could not frob a
whatzit" and grep for "frob a whatzit", but somebody decided to break
that string in the middle to avoid a line wrap, you won't find the spot.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags