Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VtKje-0008Hq-Nt for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Dec 2013 17:16:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VtKjd-0003O3-53 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Dec 2013 17:16:37 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VtKjc-0003Nw-44 for pgsql-bugs@postgresql.org; Wed, 18 Dec 2013 17:16:36 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VtKjY-0007Dj-Fv for pgsql-bugs@postgresql.org; Wed, 18 Dec 2013 17:16:35 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1VtKjU-00005D-O0; Wed, 18 Dec 2013 12:16:28 -0500 Date: Wed, 18 Dec 2013 12:16:28 -0500 From: Bruce Momjian To: Alvaro Herrera Cc: Tom Lane , nicolas@marchildon.net, Bugs for PostgreSQL Subject: Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd Message-ID: <20131218171628.GA1690@momjian.us> References: <296.1367950228@sss.pgh.pa.us> <20130507181904.GA26800@eldon.alvh.no-ip.org> <20131204155257.GD17114@momjian.us> <20131204190338.GP5158@eldon.alvh.no-ip.org> <20131209210532.GA2119@momjian.us> <20131209214539.GL6777@eldon.alvh.no-ip.org> <20131210004734.GE2119@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131210004734.GE2119@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Mon, Dec 9, 2013 at 07:47:34PM -0500, Bruce Momjian wrote: > On Mon, Dec 9, 2013 at 06:45:39PM -0300, Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > > > return STATUS_ERROR; > > > } > > > > > > ! user_name = get_user_name(&errstr); > > > ! if (!user_name) > > > { > > > ! ereport(LOG, (errmsg("%s\n", errstr))); > > > ! pfree(errstr); > > > return STATUS_ERROR; > > > } > > > > The message is already translated by get_user_name, so I think this > > should use errmsg_internal() instead of errmsg(). Also, why do you add > > a newline? > > OK, done. > > > Not clear whether the new file should be in src/port or src/common. > > Agreed. It isn't designed to add missing OS functionality, but it is > mostly OS-specific code. > > Updated patch attached, with Tom's requested changes. Patch applied. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs