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 1iL2xE-0006XG-Bz for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Oct 2019 10:24:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iL2xC-0002w6-NT for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Oct 2019 10:24:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iL2xC-0002vq-B3 for pgsql-hackers@lists.postgresql.org; Thu, 17 Oct 2019 10:24:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iL2x9-0006T7-UF for pgsql-hackers@lists.postgresql.org; Thu, 17 Oct 2019 10:24:21 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9HAOA2d021548; Thu, 17 Oct 2019 06:24:11 -0400 From: Tom Lane To: Stephen Frost cc: "imai.yoshikazu@fujitsu.com" , Euler Taveira , Andrew Gierth , Justin Pryzby , PostgreSQL Hackers Subject: Re: v12 and pg_restore -f- In-reply-to: <20191016172148.GH6962@tamriel.snowman.net> References: <20191006190839.GE18030@telsasoft.com> <28770.1570394593@sss.pgh.pa.us> <875zl11tla.fsf@news-spur.riddles.org.uk> <30069.1570396524@sss.pgh.pa.us> <20191008180840.GQ6962@tamriel.snowman.net> <20191009124505.GT6962@tamriel.snowman.net> <20191016172148.GH6962@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Wed, 16 Oct 2019 13:21:48 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19890.1571307850.1@sss.pgh.pa.us> Date: Thu, 17 Oct 2019 12:24:10 +0200 Message-ID: <19891.1571307850@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > First, I'd like to clarify what I believe Tom's suggestion is, and then > talk through that, as his vote sways this topic pretty heavily. > Tom, I take it your suggestion is to have '-f -' be accepted to mean > 'goes to stdout' in all branches? Yes. > That goes against the argument that > we don't want to break existing scripts, as it's possible that there are > existing scripts that depend on '-f -' actually going to a './-' file. While that's theoretically possible, I think that the number of cases where somebody is actually expecting that is epsilon. It seems more useful to tell people that they can now use "-f -" in all branches, and it's required to use it as of v12. Alternatively, we could revoke the requirement to use "-f -" in 12, and wait a couple releases before enforcing it. The fundamental problem here is that we tried to go from "-f - doesn't work" to "you must use -f -" with no grace period where "-f - is optional". In hindsight that was a bad idea. > If you meant for all branches to accept '-f -' and have it go to a './-' > file then that's just a revert of this entire change, which I can't > agree with either No, I'm not proposing a full revert. But there's certainly room to consider reverting the part that says you *must* write "-f -" to get output to stdout. regards, tom lane