Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9KKH-0006q8-9D for pgsql-docs@arkaria.postgresql.org; Tue, 22 Nov 2016 23:18:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c9KKG-0000Yw-Il for pgsql-docs@arkaria.postgresql.org; Tue, 22 Nov 2016 23:18:08 +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 1c9KJu-0000A0-BE for pgsql-docs@postgresql.org; Tue, 22 Nov 2016 23:17:46 +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 1c9KJr-0000qV-DC for pgsql-docs@postgresql.org; Tue, 22 Nov 2016 23:17:45 +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 uAMNHZob016841; Tue, 22 Nov 2016 18:17:35 -0500 From: Tom Lane To: Bruce Momjian cc: "Jason O'Donnell" , pgsql-docs@postgresql.org Subject: Re: Example error in createdb doc In-reply-to: <20161122223144.GA31341@momjian.us> References: <20161122223144.GA31341@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 22 Nov 2016 17:31:44 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16839.1479856655.1@sss.pgh.pa.us> Date: Tue, 22 Nov 2016 18:17:35 -0500 Message-ID: <16840.1479856655@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Bruce Momjian writes: > On Thu, Oct 27, 2016 at 09:01:59PM -0400, Jason O'Donnell wrote: >> The example given for createdb fails because template0 is not provided: > I have looked over this report and patch, and it just doesn't feel > right. The example is intending to show how to use common psql-like > options to control createdb. Adding the encoding is nice, but then > having to switch to template0 so the encoding setting works just seems > beyond the scope of what we want do there. > I think the attached patch is more focused. I dunno. The use of -e seems pretty pointless for a call that is going to yield a trivial CREATE DATABASE command. Besides, we already showed a minimal example. If you think Jason's example is too complex, what about just subbing in "-T template0" for "-E LATIN1"? That should work regardless of other configuration. Also, your change to the text loses the point that -e provokes printing the underlying command. Admittedly, that was somewhat indirect in the way it was phrased before, but now the concept is just gone entirely; that doesn't feel like an improvement either. Personally I thought Jason's patch was fine as-is. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs