Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
Дата
Msg-id 20131204190338.GP5158@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
Bruce Momjian wrote:
> On Tue, May  7, 2013 at 02:19:05PM -0400, Alvaro Herrera wrote:

> I have developed the attached patch to fix this and another instance I
> saw.

Remember to set errno = 0 before calling the getpw* function; at least
in initdb it would be meaningful.  And in the pg_upgrade case, it seems
better to abort the upgrade if this call doesn't work.  (Also, there are
other uses of getpwuid/getpwnam elsewhere.  Not sure we want to worry
too much about them.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
Следующее
От: maciek@heroku.com
Дата:
Сообщение: BUG #8656: Duplicate data violating unique constraints