Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
Date
Msg-id 20131218171628.GA1690@momjian.us
Whole thread Raw
In response to Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd  (Bruce Momjian <bruce@momjian.us>)
Responses Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd  (Christoph Berg <cb@df7cb.de>)
List pgsql-bugs
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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

pgsql-bugs by date:

Previous
From: Brett Neumeier
Date:
Subject: Re: BUG #8684: Tables with custom range domain type cannot be analyzed
Next
From: Andres Freund
Date:
Subject: Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby