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 1gu3Ru-0000um-13 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 22:56:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gu3Rs-0004XJ-Ge for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 22:56:12 +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 1gu3Rs-0004X7-8r for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 22:56:12 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gu3Rm-0007Ri-Av for pgsql-hackers@postgresql.org; Wed, 13 Feb 2019 22:56:11 +0000 Received: from [192.168.127.1] (port=20502 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1gu3Rl-000LLH-4s for pgsql-hackers@postgresql.org; Wed, 13 Feb 2019 22:56:05 +0000 Received: from [127.0.0.1] (port=63586 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gu3Rk-0006eu-GE for pgsql-hackers@postgresql.org; Wed, 13 Feb 2019 22:56:04 +0000 From: Andrew Gierth To: pgsql-hackers@postgresql.org Subject: proposal: pg_restore --convert-to-text Message-ID: <87sgwrmhdv.fsf@news-spur.riddles.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Wed, 13 Feb 2019 22:56:04 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk One of the remarkably common user errors with pg_restore is users leaving off the -d option. (We get cases of it regularly on the IRC channel, including one just now which prompted me to finally propose this) I propose we add a new option: --convert-to-text or some such name, and then make pg_restore throw a usage error if neither -d nor the new option is given. Opinions? (Yes, it will break the scripts of anyone who is currently scripting pg_restore to output SQL text. How many people do that?) -- Andrew (irc:RhodiumToad)