Re: BUG #17074: PQsocket() truncate hande on win64

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: barlone(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17074: PQsocket() truncate hande on win64
Date: 2021-06-28 14:19:11
Message-ID: 153442.1624889951@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Function PQsocket from libpq returns int. But on win64, int type has 32
> bits, and socket handle has 64 bits.
> PQsocket must return а different type, may be ptrdiff_t.

We can't just redefine the result type of PQsocket without
causing API/ABI breakage everywhere.

Perhaps it would be worth inventing a Windows-only function that
returns a connection's socket handle. There hasn't been much
demand for that though.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Rogerio Fidelis Amorim 2021-06-28 14:48:14 Unable to connect to server: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
Previous Message PG Bug reporting form 2021-06-28 12:23:07 BUG #17074: PQsocket() truncate hande on win64