Search Postgresql Archives

Re: [HACKERS] libpq port number handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sam Mason <sam@xxxxxxxxxxxxx> writes:
> 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.

I had been thinking about applying strstr to insist that the string
contain only digits (and maybe spaces), but the range check you suggest
is probably more useful.  Anyone have objections?  (BTW, are port
numbers still limited to 16 bits in IPv6?  If not then this won't do.)

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux