Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctdNE-0003GY-Qr for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Mar 2017 16:56:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ctdNE-0002XP-DP for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Mar 2017 16:56:36 +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 1ctdLi-0005iE-Iv for pgsql-hackers@postgresql.org; Thu, 30 Mar 2017 16:55:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ctdLf-0007W4-Ts for pgsql-hackers@postgresql.org; Thu, 30 Mar 2017 16:55:02 +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 v2UGsnQ1025880; Thu, 30 Mar 2017 12:54:49 -0400 From: Tom Lane To: Fabien COELHO cc: Corey Huinker , Daniel Verite , "David G. Johnston" , Greg Stark , Erik Rijkers , Robert Haas , Jim Nasby , PostgreSQL Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless) In-reply-to: References: <24980.1490748720@sss.pgh.pa.us> <21747.1490796899@sss.pgh.pa.us> <10990.1490847359@sss.pgh.pa.us> <18081.1490888751@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Thu, 30 Mar 2017 18:22:23 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25878.1490892889.1@sss.pgh.pa.us> Date: Thu, 30 Mar 2017 12:54:49 -0400 Message-ID: <25879.1490892889@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Fabien COELHO writes: >> If it actually is impossible to give pgbench equivalent behavior, we'll >> just have to live with the discrepancy, > Yep. >> but ISTM it could probably be made to work. > Even if it could somehow, I do not see it as a useful feature for pgbench. Perhaps not. > I also lack a good use case for psql for this feature. It doesn't seem very outlandish to me: the alternative would be to repeat all of a query that might span dozens of lines, in order to change one or two lines. That's not very readable or maintainable. I'm prepared to believe that extremely long queries aren't ever going to be common in pgbench scripts, so that there's not much need to support the equivalent behavior in pgbench. So maybe it's fine. 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