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 1h9xPc-0008Bt-Sf for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Mar 2019 19:43:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9xPb-0001QK-9M for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Mar 2019 19:43:35 +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 1h9xPa-0001QD-Tc for pgsql-hackers@lists.postgresql.org; Fri, 29 Mar 2019 19:43:35 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9xPY-0001Gy-HX for pgsql-hackers@lists.postgresql.org; Fri, 29 Mar 2019 19:43:33 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1478:70e0:76e5:bff:fef3:7e00]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 44WBxG63qRz3Dws; Fri, 29 Mar 2019 20:43:30 +0100 (CET) Date: Fri, 29 Mar 2019 20:43:30 +0100 From: Christoph Berg To: Joe Conway Cc: Pavel Stehule , Tom Lane , Andres Freund , Tatsuo Ishii , Andreas Karlsson , Tomas Vondra , eldmannen@gmail.com, mark.kirkwood@catalyst.net.nz, Michael Paquier , Chris Travers , Alvaro Herrera , Euler Taveira , rjuju123@gmail.com, PostgreSQL Hackers Subject: Re: PostgreSQL pollutes the file system Message-ID: <20190329194330.GD19154@msg.df7cb.de> References: <375ea28a-2e8c-9954-66b1-bd0a3ff657f5@proxel.se> <18182.1553697687@sss.pgh.pa.us> <20190329.100407.1159785913847835944.t-ishii@sraoss.co.jp> <20190329152557.GI20294@msg.df7cb.de> <24256.1553874086@sss.pgh.pa.us> <20190329155121.5zyoahgh4i2r4ayl@alap3.anarazel.de> <19517.1553876700@sss.pgh.pa.us> <20190329185031.GA19154@msg.df7cb.de> <48e5efaf-7ea2-ed70-a803-949bbfec8f6b@joeconway.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48e5efaf-7ea2-ed70-a803-949bbfec8f6b@joeconway.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Re: Joe Conway 2019-03-29 <48e5efaf-7ea2-ed70-a803-949bbfec8f6b@joeconway.com> > echo "\password :\"role\"" | psql -v role='my role' > Enter new password: > Enter it again: > > That said, this is kind of off the topic of this thread. It is on-topic because the reason we can't just tell people to replace createuser $foo with psql -c "create user $foo" is because $foo might need escaping. IMHO if we find an way to do that which is acceptable for sh scripts, the createuser/... commands could go. > I like Tom's last suggestion of: > > pg_util > > Of course that does not lend itself to symlinking for backward > compatibility, does it? If there is a way I am not familiar with it. We could symlink createuser -> pg_util. It is pretty common for commands to act differently based on the name the were invoked as. > I guess the alternative would be an alias, but can packages install an > alias? Or something else I am not thinking about? Aliases won't work for non-interactive shell scripts. Christoph