Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltIM0-0002p0-8u for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Jun 2021 23:20:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltILy-0004NG-BU for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Jun 2021 23:20:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltILy-0004N7-3c for pgsql-hackers@lists.postgresql.org; Tue, 15 Jun 2021 23:20:18 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltILv-0000Cd-N0 for pgsql-hackers@lists.postgresql.org; Tue, 15 Jun 2021 23:20:16 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A4B565C01C7; Tue, 15 Jun 2021 19:20:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 15 Jun 2021 19:20:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=mwgISKTzWRiQiAFLMeRt79U4JGCq6zcqje+opTC/2pA=; b=lTI6KHpK 4By/EJAboYFosIvShlM0WvBbbArk3lm6vZk3GBtsyaIBvn4llzF3qoUBFYfjzoPs HQKvf5gcxQPIdiw03XFtx8DKN+YYcpXl6/TDanwBo1LCw4seNmdTx1mkjEM4mnEi QDQkL9OafJKW9o/MIIELEGWtgHNPQRqlp9xbXGjdXQ63sHNneGnrmMf6hsEQlq9N /srBV9OkiMLCp0IsnJiqiOHEWw39zIvmSAwqCUtrgyyTYEUc/vceJGr3EfWGvPxT sN80LzcQQcpkeUPqhe5Vsz58L9vG9HRUCKJ3wDo3dNSG00d6bekJtP2tINddFiVD E5o4bDewa3BvDw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvkedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjgesthekre dttddtudenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepgeegveevffevje ffudethfdvtdeggefhhffguefhfeejiefgvefhfeelvedtudetnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Jun 2021 19:20:14 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 29C972A0ADA; Tue, 15 Jun 2021 19:20:11 -0400 (-04) Date: Tue, 15 Jun 2021 19:20:11 -0400 From: Alvaro Herrera To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Improving isolationtester's data output Message-ID: <202106152320.xfiprkh4sp5c@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <582362.1623798221@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jun-15, Tom Lane wrote: > I've been spending a lot of time looking at isolationtester results > over the past couple of days, and gotten really annoyed at how poorly > it formats query results. In particular, any column heading or value > that is 15 characters or longer is not separated from the next column, > rendering the output quite confusing. Yeah, I noticed this too. > Attached is a little hack that tries to improve that case while making > minimal changes to the output files otherwise. Seems pretty reasonable. > There's still a good deal to be desired here: notably, the code still > does nothing to ensure vertical alignment of successive lines when > there are wide headings or values. But doing anything about that > would involve much-more-invasive changes of the output files. > If we wanted to buy into that, I'd think about discarding this > ad-hoc code altogether in favor of using one of libpq's fe-print.c > routines. But I'm not really sure that the small legibility gains > that would result are worth massive changes in the output files. Shrug -- it's a one time change. It wouldn't bother me, for one. -- Álvaro Herrera Valdivia, Chile "Hay que recordar que la existencia en el cosmos, y particularmente la elaboración de civilizaciones dentro de él no son, por desgracia, nada idílicas" (Ijon Tichy)