libpq port number handling

Поиск
Список
Период
Сортировка
От Sam Mason
Тема libpq port number handling
Дата
Msg-id 20090924195140.GG22438@samason.me.uk
обсуждение исходный текст
Ответ на Re: Newbie's question: How can I connect to my postgresql-server?  (Sam Mason <sam@samason.me.uk>)
Ответы Re: [HACKERS] libpq port number handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] libpq port number handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] libpq port number handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Sep 24, 2009 at 07:57:55PM +0100, Sam Mason wrote:
> > postgres@sussy:/root> createuser -D -p ricky
>
> I don't think you want to be passing "-p" here; it's saying to use
> "ricky" as the port number, which fails (sounds like a bug if it doesn't
> complain about this) giving a port number of zero

Hum, why is PG doing an (unchecked) atoi on the user specified port
rather than leaving it up to getaddrinfo to resolve the port?  It would
seem to require changing UNIXSOCK_PATH to accept a string as the "port
number", which is probably a bit much of a change.

The included doesn't feel very nice, but is probably more acceptable.

--
  Sam  http://samason.me.uk/

Вложения

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

Предыдущее
От: Rob Marjot
Дата:
Сообщение: Re: generic modelling of data models; enforcing constraints dynamically...
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Newbie's question: How can I connect to my postgresql-server?