Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRC79-0003fg-Pt for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2019 08:51:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hRC78-00065N-6W for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2019 08:51:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRC77-00065F-Tk for pgsql-hackers@lists.postgresql.org; Thu, 16 May 2019 08:51:45 +0000 Received: from courriel.mines-paristech.fr ([77.158.173.149] helo=antispam-1.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRC74-0006Ok-98 for pgsql-hackers@lists.postgresql.org; Thu, 16 May 2019 08:51:45 +0000 Received: from smtp-4.mines-paristech.fr (smtp-4.ensmp.fr [77.158.173.143]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by antispam-1.ensmp.fr (antispam.mines-paristech.fr) with ESMTPS id 4024655F7B; Thu, 16 May 2019 10:51:40 +0200 (CEST) Received: from lancre (unknown [157.159.39.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-4.mines-paristech.fr (Postfix) with ESMTPSA id 64D892C0504; Thu, 16 May 2019 10:43:08 +0200 (CEST) Date: Thu, 16 May 2019 10:43:08 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@lancre To: Daniel Verite cc: "Iwata, Aya" , PostgreSQL Developers Subject: RE: psql - add SHOW_ALL_RESULTS option In-Reply-To: <710caf32-a5f9-4511-bd9d-736c1a91f4c3@manitou-mail.org> Message-ID: References: <710caf32-a5f9-4511-bd9d-736c1a91f4c3@manitou-mail.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: -100 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddruddttddgtdeiucetufdoteggodetrfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvufgjkfhffgggtgesthdtredttdervdenucfhrhhomhephfgrsghivghnucevqffgnffjqfcuoegtohgvlhhhohestghrihdrvghnshhmphdrfhhrqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeduheejrdduheelrdefledrudejnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bonjour Daniel, >>>> IMHO this new setting should be on by default: few people know about \; so >>>> it would not change anything for most, and I do not see why those who use >>>> it would not be interested by the results of all the queries they asked for. >>> I agree with your opinion. >> >> Ok. I did not yet change the default in the attached version, though. > > I'd go further and suggest that there shouldn't be a variable > controlling this. All results that come in should be processed, period. > It's not just about \; If the ability of CALL to produce multiple > resultsets gets implemented (it was posted as a POC during v11 > development), this will be needed too. I do agree, but I'm afraid that if there is no opt-out it could be seen as a regression by some. >> This attached version does: >> - ensure that warnings appear just before its >> - add the entry in psql's help >> - redefine the function boundary so that timing is cleaner >> - include somehow improved tests > > \errverbose seems to no longer work with the patch: > > test=> select 1/0; > psql: ERROR: division by zero > > test=> \errverbose > There is no previous error. > > as opposed to this output with PG11: > > test=> \errverbose > ERROR: 22012: division by zero > LOCATION: int4div, int.c:820 Thanks for the catch. I'll investigate. > \errverbose has probably no regression tests because its output includes > these ever-changing line numbers; hence `make check` cannot be used to > find this regression. What is not tested does not work:-( The TAP infrastructure for psql included in some patch (https://commitfest.postgresql.org/23/2100/ I guess) would help testing such slightly varying features which cannot be tested with a hardcoded reference text. -- Fabien.