On 08.01.25 21:29, Jacob Champion wrote:
It'd also couple clients against libpq-int.h, so they'd have to
remember to recompile every release. I'm worried that'd cause a bunch
of ABI problems...
Couldn't that function use PQsocket() to get at the actual socket from
the PGconn handle?
It's an output parameter (i.e. the async callback is responsible for
setting conn->altsock). Unless I've missed the point entirely, I don't
think PQsocket() helps here.
Maybe it would work to just use plain "int" as the type here. Any
socket number must fit into int anyway in order for PQsocket() to be
able to return it. The way I understand Windows socket handles, this
should work.