David Helgason <david(at)uti(dot)is> writes:
> I'm having trouble finding out how to find the current PGconn
> connection inside a C function.
What makes you think that "*the* current PGconn" is a valid concept?
libpq has always supported multiple active connections.
regards, tom lane