Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLvkj-0002j7-Tt for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2017 18:13:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLvkj-0002ba-E9 for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2017 18:13:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLvjB-0008JF-Ft for pgsql-hackers@postgresql.org; Fri, 16 Jun 2017 18:12:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLvj9-00072O-4B for pgsql-hackers@postgresql.org; Fri, 16 Jun 2017 18:12:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v5GIBws8011869; Fri, 16 Jun 2017 14:11:58 -0400 From: Tom Lane To: Andres Freund cc: Bruce Momjian , Peter Eisentraut , Alvaro Herrera , Robert Haas , Stephen Frost , "pgsql-hackers@postgresql.org" , Piotr Stefaniak Subject: Re: Preliminary results for proposed new pgindent implementation In-reply-to: <20170616180212.4yk44vso3n24bfns@alap3.anarazel.de> References: <20170519173111.zp6igkcg53egdy4s@alvherre.pgsql> <29275.1497624664@sss.pgh.pa.us> <8827.1497633050@sss.pgh.pa.us> <20170616171946.qqy5tapovsamkxyg@alap3.anarazel.de> <9900.1497634441@sss.pgh.pa.us> <20170616174430.GQ11450@momjian.us> <20170616180212.4yk44vso3n24bfns@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 16 Jun 2017 11:02:12 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11867.1497636718.1@sss.pgh.pa.us> Date: Fri, 16 Jun 2017 14:11:58 -0400 Message-ID: <11868.1497636718@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2017-06-16 13:44:30 -0400, Bruce Momjian wrote: >> Yes, it is all about <80 column output. The current pgindent does >> everything possible to accomplish that --- the question is whether we >> want uglier code to do it. > For me personally the misindentation is way uglier than a too long line. I'm coming around to that opinion too. We have many source lines that are a bit too long, or a lot too long if someone decided they didn't want to split an error message across lines. pgindent "fixes" that in some places but not others (if it would have to go left of the prevailing statement indent, it gives up and indents to the paren level anyway). On balance it's just weird. Better to indent normally and let the programmer decide if she wants to break the lines differently to keep them from wrapping. I assume though that Piotr wants an option to preserve that behavior. I'm happy to write up a patch for bsdindent that adds a switch controlling this, but is there any rhyme or reason to the way its switches are named? 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