Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYt9Z-0003Hj-GW for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Feb 2017 11:32:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cYt9Z-0002ie-0G for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Feb 2017 11:32:45 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cYt89-00015b-Ic for pgsql-hackers@postgresql.org; Wed, 01 Feb 2017 11:31:17 +0000 Received: from lb2-smtp-cloud6.xs4all.net ([194.109.24.28]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cYt86-0001WU-Vd for pgsql-hackers@postgresql.org; Wed, 01 Feb 2017 11:31:17 +0000 Received: from webmailclassic.xs4all.nl ([194.109.20.195]) by smtp-cloud6.xs4all.net with ESMTP id fPXB1u00J4CYHle01PXBt3; Wed, 01 Feb 2017 12:31:12 +0100 Received: from edwardsnowden0.torservers.net ([109.163.234.7]) by webmailclassic.xs4all.nl with HTTP (HTTP/1.1 POST); Wed, 01 Feb 2017 12:31:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Feb 2017 12:31:11 +0100 From: Erik Rijkers To: Corey Huinker Cc: Tom Lane , Fabien COELHO , Daniel Verite , PostgreSQL , pgsql-hackers-owner@postgresql.org Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless) In-Reply-To: References: <1084.1485886511@sss.pgh.pa.us> Message-ID: X-Sender: er@xs4all.nl User-Agent: XS4ALL Webmail X-Pg-Spam-Score: -2.6 (--) 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 On 2017-02-01 09:27, Corey Huinker wrote: > 0001.if_endif.v4.diff A few thoughts after a quick try: I dislike the ease with which one gets stuck inside an \if block, in interactive mode. (for instance, in my very first session, I tried '\? \if' to see if there is more info in that help-screen, but it only displays the normal help screen. But after that one cannot exit with \q anymore, and there is no feedback of any kind (prompt?) in which black hole one has ended up. Only a \endif provides rescue.) Therefore making it possible to break out of \if-mode with Ctrl-C would be an improvement, I think. I would even prefer it when \q would exit psql always, even from within \if-mode. Also, shouldn't the prompt change inside an \if block? thanks, Erik Rijkers -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers