From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Stats Collector Won't Start |
Date: | 2006-10-19 16:53:42 |
Message-ID: | 60u0205js9.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) writes:
> Chris Browne <cbbrowne(at)acm(dot)org> writes:
>> Is there a more elegant way of setting the requested port to 0 than my
>> 2-liner?
>
> What I'm tempted to do is add this to pg_getaddrinfo_all (in
> src/backend/libpq/ip.c):
>
> {
> /* not all versions of getaddrinfo() zero *result on failure */
> *result = NULL;
>
> + #ifdef _AIX
> + /* it seems AIX's getaddrinfo doesn't reliably zero sin_port */
> + if (servname == NULL)
> + servname = "0";
> + #endif
> +
> #ifdef HAVE_UNIX_SOCKETS
> if (hintp->ai_family == AF_UNIX)
> return getaddrinfo_unix(servname, hintp, result);
>
> Want to try that?
That seems to work fine, too. And that seems somewhat more
portable/elegant/something.
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://linuxfinances.info/info/internet.html
"Survival in a world of words is best made, if at all, through clever
appeal to ambiguity." -- Robert Bolt
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-10-19 17:28:05 | Re: Stats Collector Won't Start |
Previous Message | Tom Lane | 2006-10-19 16:43:21 | Re: Stats Collector Won't Start |